tiagovla / .dotfiles

118 stars 9 forks source link

May I ask if your Python LSP's inlay hint feature is working? #3

Closed Fau818 closed 10 months ago

Fau818 commented 10 months ago

I found the inlay hint only works on single file mode on my neovim.

tiagovla commented 10 months ago

I just tested it in single file mode, and with a root, both are working.

Fau818 commented 10 months ago

Thanks for your reply. Unfortunately, I just tested your neovim config, but I cannot reproduce the inlay hints.

Just to be sure, you can still see type hints when using the LspInfo command to check the status of pylance, and if pylance is NOT in "root directory: Running in single file mode".

To avoid ambiguity, I've posted the demo image below which only works with a single file for me.

image

EDIT: Sorry, I just tested your neovim configuration and reproduced the inlay hints successfully. Please ignore the question above, thanks again!

Fau818 commented 10 months ago

I found the problem, and it is necessary to set the value of settings.python.pythonPath.

Thanks for the inspiration of your dotfiles.