vim-lsc icon indicating copy to clipboard operation
vim-lsc copied to clipboard

pyright and Viewing Source Code Definition

Open ossie-git opened this issue 3 years ago • 1 comments

Hi,

I'm currently trying to set up vim-lsc to use pyright. It works out of the box by simply:

installing it (it requires Node.js 12+):

npm install -g pyright

and then adding the following:

let g:lsc_server_commands = { 'python' : 'pyright-langserver --stdio'}

However, a problem I've run into is that instead of taking me to the corresponding source code when I ask to Go-to-Definition, it takes me to the typeshed definition (pyi). This behavior is mentioned here - and elsewhere but from the link, it says that VSCode shows both hits and you can select which one you want. Is there any option to configure this in vim-lsc and have it provide me with an option to select one of them (or to always prefer one)? Thanks

ossie-git avatar Aug 14 '21 22:08 ossie-git

jedi-language-server works better. I never got pyright work correctly and vscode uses pylance and it's closed source, you never know what kind of patches are in there.

smekkley avatar Nov 21 '21 15:11 smekkley