4

I am transitioning from using PyCharm to VS Code and noticed that autocomplete in VS Code is not seemingly as useful as it is in PyCharm.

  • In PyCharm, once a function is defined within your project, PyCharm's autocomplete will display all the arguments that function takes. Is that possible in VS Code?
  • In PyCharm, even unknown/unimportable modules (such as those defined in an API) will appear as potential completions if that completion has been used somewhere else in the project. Are there "project" level settings in VS Code to enable this? Is this learning behavior possible through intellisense?

1 Answer 1

1

1) Intellisense displaying all the arguments of a function: Yes. This is how it shows me All the parameters appear like this

2) Intellisense showing potential completion of modules: Yup. I hope this is what you mean. enter image description here

3) If you are referring to settings that only work in your current project, Yes. You need to save your workspace first (go to File>Save Workspace As ..., and then head over to the workspace settings by using Ctrl+Shift+P and search for Workspace settings.

I hope I understood your queries correctly.

It seems that you are yet to set up your python intellisense. Try going according to the tutorial here. https://code.visualstudio.com/docs/languages/python

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks! Intellisense is operating as well as Intellij (for my purposes). The problem was that if a module was defined in file B, and I was trying to use it in file A, potential completion wasn't working. Perhaps I needed to restart, or to open the directory with project manager? My second issue is with using a vendor-written API (translates C# vendor commands to python executable by a user). The API is not a loadable module in python so the environment is inaccessible outside of the vendor's software. So autocomplete is impossible, however, IDE "figures out" by seeing them in use elsewhere.
@noisy123 Let's say your first file is A.py, and you are writing in B.py. Use import A in B.py. Now you will be able to perform autocomplete for functions/modules defined in A.py from B.py. For example if you have a method func() in A.py, you need can call it in the other file using A.func(), and IntelliSense should be working there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.