Search code examples
pythonvisual-studio-codepython-jedipyright

Vscode shows function docstrings twice when using jedi + pyright


I am using VSCodium (an open source version of vscode) with jedi and pyright installed. This leads to function docstrings getting displayed twice (see attached picture), as jedi and pyright both show them.

Is there a way to disable this single feature for jedi without disabling jedi completely?screenshot


Solution

  • It turns out that Pyright itself is a language server and therefore vscode shows both the output of pyright and jedi at the same time. Adding "python.languageServer": "None", in your config fixes this.

    See also: https://github.com/microsoft/pyright/issues/390, https://github.com/microsoft/vscode-python/issues/7010 and https://github.com/microsoft/pyright/issues/201

    Update: An alternative approach is to continue using jedi or any other language server and just set "pyright.disableLanguageServices" to true.