0

I am trying to get IntelliSense to work for my local modules inside my projects lib folder. I have the following project structure:

.Python
 |---> lib
 |     |---> __init__.py
 |     |---> gw_marker.py
 |     |---> gw_mumble_link.py
 |---> markermaker.py

I tried to add ./lib/ to the python.autoComplete.extraPaths property in VSCode which didn't work. As seen here it will not show any suggestions for the local module nor the documentation of the definitions.

CodinGuy
  • 11
  • 1
  • Have you tried restarting VSCode? – NotAName Oct 04 '22 at 00:29
  • Yes, multiple times no changes – CodinGuy Oct 04 '22 at 01:09
  • What exactly are you adding to your extra paths? Are you doing this in a global settings file? A workspace settings file? Also, lots of suggestions here: [visual-studio-code-how-to-add-multiple-paths-to-python-path](https://stackoverflow.com/questions/41471578/visual-studio-code-how-to-add-multiple-paths-to-python-path) and of course (perhaps more importantly) be sure you are following the example from VSCode docs: [enable-intellisense-for-custom-package-locations](https://code.visualstudio.com/docs/python/editing#_enable-intellisense-for-custom-package-locations) – topsail Oct 04 '22 at 01:26
  • I edited the settings.json of vscode I tried using relative and absolute paths, nothing changed. – CodinGuy Oct 04 '22 at 03:18
  • it worked with the env file, but for some reason intellisense doesn't work when the variable was passed through as a parameter. It works in the `def main()` but not in `def on_release(key, name, mumble, marker)` – CodinGuy Oct 04 '22 at 03:28

1 Answers1

0

According to this case in github.

This is currently by design. currently, we do not add user types in auto import unless it is already used (doesn't need to be current file, but by some imports or other opened files). code action on the other hand, adds all user types. this was a decision to make sure we do not add hundreds of user types in completion list.

MingJie-MSFT
  • 5,569
  • 1
  • 2
  • 13