question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Intellisense does not work on function level imports when using Vim plugin and in a decorated function

See original GitHub issue

Environment 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 not working

Intellisense starts working if I deleted the decorator. If I add the decorator back it continues to work normally. intellisense working

Expected behavior

Intellisense should work when imports are at function level in a decorated function

intellisense working

Steps to reproduce:

  1. Install Vim plugin
  2. Import a class while in a function that is wrapped with a decorator
  3. Try and get intellisense on class attributes (doesnt work)
  4. Delete decorator
  5. Intellisense works
  6. Re-add decorator
  7. 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:closed
  • Created 5 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
brettcannoncommented, May 29, 2018

And works fine in analysis engine.

1reaction
DonJayamannecommented, May 8, 2018

@brettcannon @ericsnowcurrently @MikhailArkhipov @d3r3kk Ok, any VIM users in our team. I’m struggling with VIM (i have no idea how VIM works, lol).

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found