Home > other >  How to edit built in code completion or snippets in vscode
How to edit built in code completion or snippets in vscode

Time:04-26

Although I searched my problem before, I couldn't find any solution.

I need to find the file in which default/built-in code snippets are, and edit it. Indeed I don't know exactly is it from Python extension or the language server which is currently set to "Pylance" in my setting.

As an example, if want to implement __call__ in my class, in suggestion pop-up there is no indication that it is a snippet: (btw, I haven't defined any custom snippet)

enter image description here

After tab it changes to:

enter image description here

Which is obviously not what I want. I have to either import Any from typing module or manually delete those type hints.

clarification:

  1. OS: Pop!_OS 21.10 x86_64

  2. I've checked ./ms-python.vscode-pylance2022.4.2/dist/typeshedfallback/stubs/whatthepatch/whatthepatch/snippets.pyi file but it doesn't contain those.

  3. Also my /usr/share/code/resources/app/extensions/python directory doesn't have snippets directory as mentioned enter image description here

  • Related