-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Intellisense in not working on multiple folder structure #4630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@Jeyanthinath, thanks for letting us know about this problem. It's likely that this is a bug in the language server, but before we go that route I'd like to reproduce the issue. Is this a problem with a multi-root workspace or with a normal, single-root workspace? How does the location of the .vscode file factor into the problem you are seeing? Presumably it is in the workspace folder you have loaded. Note that the language server will only deal with files under your workspace root (i.e. where the .vscode directory is). |
@ericsnowcurrently , its happening in multi-root folder structure , after I keep on adding other folders the python intellisense stopped working randomly . If I open the python folder in a new single root folder structure it works |
Language Server : user settings:
|
Thanks for checking that, @Jeyanthinath. We will work on fixing the problem. |
I'm having the same problem on VSCode 1.39.2, Microsoft Python Language Server version 0.4.79.0, Python 3.7.4, Windows 10. |
As far as I can see, code analysis only works for 1 of the several roots I have in my workspace. The way the Language Server works out which root to use is by checking which file is displayed in the active tab during application start. You can influence which file will be active during application start, for example by ensuring that only 1 tab is open when you close the window, and the next time you start VSCode, the file in that tab will be open, and the Language Server will only analyse the Python code in the root folder that contains the active file. Intellisense will not work in other root folders. |
I have the exact same problem as described by @raaaaaymond. To verify, clone the vscode_multi_workspace_bug_repro and use the 'Peek definition' for the different classes in the repo. This works for only one root. Below is the output from "VS Code About':
|
Same issue. Only remedy seems to be to reopen vscode every time to switch the current root. |
Closing in favour of #5132. |
Environment data
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
Expected behaviour
Intellisense should work even in multilevel tree structure
Actual behaviour
Intellisense is working only on single level tree structure
Steps to reproduce:
Multiple folder structure (1)
| - project a
| - project b
| - Project c
...| .vscode
...| - folder 1
...| - folder 2
...| - folder 3
.......| - test.py
.......| - test1.py
Multiple folder structure (2)
| - project a
| - project b
| - Project c
...| - folder 1
...| - folder 2
...| - folder 3
.......| - .vscode
........| - test.py
In both the cases , just the .vscode file is placed differently , here no auto-complete feature is working ,but when I open a new tab with only one folder structure it is working absolutely fine .
Any ideas ?
Logs
Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
; turn on source maps to make any tracebacks be useful by runningEnable source map support for extension debugging
)The text was updated successfully, but these errors were encountered: