LSP - RestartServers when the PythonPath is changed (global or project)#1504
Open
idanmiara wants to merge 1 commit intolmbelo:masterfrom
Open
LSP - RestartServers when the PythonPath is changed (global or project)#1504idanmiara wants to merge 1 commit intolmbelo:masterfrom
idanmiara wants to merge 1 commit intolmbelo:masterfrom
Conversation
… (global or project)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
related to #1404
When the Extra Python Path is changed restart the LSP server - so the LSP will register the new paths.
in #1404 (comment)
You wrote - "If you alter the python path via environment variables or registry editing, these changes will be reflected in the python path that the jedi lsp sees." -
But in my tests (latest 5.3.1) - Extra Global paths are not recognized by the LSP (even if the LSP Server is restarted),
I tried both adding the path using the GUI, and also adding to
python_int.pyi.e.sys.path.append(r'c:\temp\python')- neither work for the LSP (they do get recognized by the interpreter).I added in this PR a restart also when the Global Path is changed, but this change is not helpful if the Global Path is not recognized by the LSP.
As a working workaround, you can take a look at the following approach, which does work (see latest commits to these branches):
https://github.com/talos-gis/pyscripter/tree/feat/lsp_global_path
https://github.com/talos-gis/python4delphi/tree/feat/lsp_global_path