srusskih / SublimeJEDI

awesome Python autocompletion with SublimeText
MIT License
938 stars 109 forks source link

Goto opens package from another virtualenv #281

Open ak4nv opened 5 years ago

ak4nv commented 5 years ago

Hi!

I have a few projects and I switch between them using hotkey Ctrl+Alt+P. When I press Ctrl+Shift+G on the object (for ex. Blueprint from Flask package) Sublime opens the object definition from the package of the current project virtualenv. (~/.virtualenvs/<current_project>/...) If I switch to another project and do the same Sublime opens the object definition from the package of the previous project virtualenv. (~/.virtualenvs/<prevous_project>/...)

Only restart Sublime fix this issue until I do the same.

my jedi settings:

{
  // "logging_level": "debug",
  "sublime_completions_visibility": "jedi",
  "auto_complete_function_params": "required",
  "auto_complete_triggers": [{"selector": "source.python", "characters": "."}],
  "python_virtualenv": "$WORKON_HOME/$project_base_name/",
  "python_interpreter": "$WORKON_HOME/$project_base_name/bin/python"
  // "python_package_paths": [
  //   "$project_path",
  //   "$WORKON_HOME/$project_base_name/lib/python3.6/site-packages",
  //   "$WORKON_HOME/$project_base_name/lib/python2.7/site-packages"
  // ]
}
srusskih commented 5 years ago

Seem like we should relay not only on window id but also on project names or so.