Open fkrauthan opened 2 weeks ago
Console mode works as expected
This is expected. Pyright's LSP mode does not support explicit explicit configuration file. See this discussion. You can file an enhancement request for Pyright, though.
Could you not add a working directory
setting to the plugin that would be used for executing the language server and the command line? Instead of running it from the project root. At least for my use-case that would solve the issue.
That wouldn't work, since LSP mode uses workspace folders and not the working directory. You can try the build out yourself to verify this.
LSP4IJ, which is the client this plugin is using, has yet to support workspace folders, so I'm afraid you will have to wait. I wonder if Pylance supports your use case.
Ah ok that make sense. Didn't know that the underlying LSP system does not yet support it.
And yeah I just tested your test build and it does not work. Even though ti seem to run the server in the context of my sub folder it still somehow detects the pyproject.toml
of the root folder.
What happened?
When using the LSP4IJ mode the language server is ignoring the Configuration file I manually set and instead uses a
pyproject.toml
in the root of my project.Steps to reproduce
my_sub
and create apyrightconfig.json
filePyright (Project)
->Configuration
setting tomy_sub/pyrightconfig.json
Running mode
to LSP4IJ`Relevant log output or stack trace
Operating system
macOS