Code Monkey home page Code Monkey logo

Comments (10)

davidhalter avatar davidhalter commented on July 20, 2024

Great! Let me know if you need any help!

from jedi.

srusskih avatar srusskih commented on July 20, 2024

@svaiter I have interested in. made a fork of your repo today

@davidhalter Does "jedi" allow using virtualenvs ?

from jedi.

davidhalter avatar davidhalter commented on July 20, 2024

@srusskih: Very good question... To be honest: I didn't think about it. I will try it. But I probably need ~1-2 weeks (many other more important issues). If I don't report back, just feel free to ask again.

from jedi.

dbrgn avatar dbrgn commented on July 20, 2024

@davidhalter @srusskih as long as the virtualenv directory is in the PYTHONPATH, it should work, right?

from jedi.

davidhalter avatar davidhalter commented on July 20, 2024

@gwrtheyrn: I doubt that there are any problems with virtualenvs and Jedi. But editors like VIM use probably just one Python version (and don't respect virtualenvs). The problem is basically that VIM starts its own Python. And I have absolutely no idea how it behaves (I have to look into it).

from jedi.

dbrgn avatar dbrgn commented on July 20, 2024

@davidhalter To determine whether a virtualenv was activated, see https://groups.google.com/forum/?fromgroups=#!topic/python-virtualenv/4wApsuUK4Xo

from jedi.

srusskih avatar srusskih commented on July 20, 2024

What reason can be for "jedi", if it does not works ?

 >>> import jedi
 >>> import os
 >>> source = """
 ... import json
 ... json.l"""
 >>> 
 >>> script = jedi.Script(source, 2, 6, os.devnull)
 >>> completions = script.complete()
 >>> completions
 [<Completion: importlib>]

UPD:
All Tests pass without fails.

from jedi.

davidhalter avatar davidhalter commented on July 20, 2024

@srusskih: indent starts with index 0: https://github.com/davidhalter/jedi#api-design-for-ides

Therefore you are on the import statement and not on os. Just increase 6 to 7 and it works.

(btw: this is still a bug, because the completion should be [] not [<Completion: importlib>]. But I know where to find that.)

from jedi.

srusskih avatar srusskih commented on July 20, 2024

@davidhalter, thanks! Works now :)

>>> jedi.Script(source, 3, 6, '').complete()
[<Completion: loads>, <Completion: load>]

from jedi.

davidhalter avatar davidhalter commented on July 20, 2024

I'm closing this, because your plugin is being mentioned on the front page (README). I'd love to see a good Sublime plugin!

from jedi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.