Intellisense does not work on function level imports when using Vim plugin and in a decorated function
See original GitHub issueEnvironment data
- VS Code version: 1.22.2
- Python Extension version: 2018.4.0-beta (doesn’t work with non-beta either)
- Vim Extension Version: 0.11.5
- OS and version: MacOS 10.13.4
- Python version: Python 3.6.2
- Type of virtual environment used : pyenv virtualenv
Actual behavior
Intellisense does not work when using the Vim plugin and importing a class at function level when the function is wrapped in a decorator, but works when import is module level
Intellisense starts working if I deleted the decorator. If I add the decorator back it continues to work normally.
Expected behavior
Intellisense should work when imports are at function level in a decorated function

Steps to reproduce:
- Install Vim plugin
- Import a class while in a function that is wrapped with a decorator
- Try and get intellisense on class attributes (doesnt work)
- Delete decorator
- Intellisense works
- Re-add decorator
- Intellisense works
Logs
The only output I get is when Flake8 shows that Session.
is invalid syntax while waiting for intellisense to start working
##########Linting Output - flake8##########
20,12,E,E999:SyntaxError: invalid syntax
Output from Console
under the Developer Tools
panel
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3301 Overwriting grammar scope name to file mapping for scope source.python.
Old grammar file: /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/python/syntaxes/MagicPython.tmLanguage.json.
New grammar file: /Users/christophepouliot/.vscode/extensions/magicstack.MagicPython-1.0.12/grammars/MagicPython.tmLanguage
e.register @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3301
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3301 Overwriting grammar scope name to file mapping for scope source.sql.
Old grammar file: /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/sql/syntaxes/sql.tmLanguage.json.
New grammar file: /Users/christophepouliot/.vscode/extensions/ms-mssql.mssql-1.3.1/syntaxes/SQL.plist
e.register @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3301
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Python Intellisense Wonky With Vim · Issue #2590 - GitHub
Intellisense does not work when using the Vim plugin and importing a class at function level when the function is wrapped in a...
Read more >Visual Studio Code: Intellisense not working - Stack Overflow
My Visual Studio Code's Intellisense is not working properly. Every time I try to use it with Ctrl + Shift , it only...
Read more >User and Workspace Settings - Visual Studio Code
To open the Settings editor, use the following VS Code menu command: ... The settings.json file has full IntelliSense with smart completions for...
Read more >Visual Studio Code | Metals - Scalameta
To manually trigger a build import, execute the "Import build" command through the command palette ( Cmd + Shift + P ). Import...
Read more >6.4 Override Functions Using Autocomplete - DVT Eclipse IDE
6.4 Override Functions Using Autocomplete. Place your cursor inside a class and then press Ctrl + Space to trigger Content Assist.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
And works fine in analysis engine.
@brettcannon @ericsnowcurrently @MikhailArkhipov @d3r3kk Ok, any VIM users in our team. I’m struggling with VIM (i have no idea how VIM works, lol).