Closed julkip closed 1 year ago
Upon some further investigation I found a way not to solve, but to circumvent this issue. When I use pylsp instead of pyright everything works just as expected.
Hi @julkip, hmm strange, it does work for me. What is your setup for lsp, pyright etc?
Closing since no reply
i also have this problem. Pyright config.
→ pyright.disableLanguageServices default: false
→ pyright.disableOrganizeImports default: false
→ pyright.disableTaggedHints default: false
→ python.analysis.autoImportCompletions default: true
→ python.analysis.autoSearchPaths default: true
→ python.analysis.diagnosticMode default: "openFilesOnly"
→ python.analysis.diagnosticSeverityOverrides
→ python.analysis.exclude default: []
→ python.analysis.extraPaths default: []
→ python.analysis.ignore default: []
→ python.analysis.include default: []
→ python.analysis.logLevel default: "Information"
→ python.analysis.stubPath default: "typings"
→ python.analysis.typeCheckingMode default: "standard"
→ python.analysis.typeshedPaths default: []
→ python.analysis.useLibraryCodeForTypes default: true
→ python.pythonPath default: "python"
→ python.venvPath default: ""
pyright has stock empty config file. By the way, this problem prevented me from bringing "poetry" support to mind.
What's your LSP config?
I have run into some issues using pyright (with nvim-lsp) in combination with swenv.nvim. When I use swenv to switch my venv I see that the correct venv is running in lualine and my toggleterm is also using the correct venv. But code checking or completion with lsp does not work. Doing
:LspRestart
does not help.When I source cd into my project folder, source the venv by hand and then start nvim from there the lsp is working as expected.