Closed munkybutt closed 1 year ago
I am not convinced that this is an issue of LSP-pyright. LSP-* merges project settings with plugin settings and send it to the server. That's all. This should be in https://github.com/microsoft/pyright/issues.
In https://github.com/microsoft/pyright/blob/main/docs/configuration.md, it only mentions A “pyrightconfig.json” file always takes precedent over “pyproject.toml” if both are present.
.
and there are 4 potential configuration sources:
It's only obvious that “pyrightconfig.json” overrides “pyproject.toml”.
If I replicate this setup in VSCode ( pyrightConfig.json
with "extraPaths"
defined and then define "python.analysis.extraPaths"
in the .workspace
file ) the behaviour is that the two lists are merged - which is the behaviour I was expecting with Sublime 😢
I don't see extraPaths
in pyrightconfig.json
is sent to Pylance in VSCode, which means it's likely handled by the server itself, which makes sense. That says, I can't reproduce your claim.
Update:
Pretty sure lists are not merged. pyrightconfig.json
is prioritized and overrides workspace config.
https://user-images.githubusercontent.com/6594915/234612349-2d9ae9d6-a664-4b78-ad5b-1d08bec9cac9.mp4
Closed as I think this issue belongs to pyright (though I don't think they will change this behavior).
Hey - I am trying to add paths to my
.sublime-project
file using"python.analysis.extraPaths"
. This is used to add project specific paths on top of the paths in mypyrightconfig.json
file. Thepyrightconfig.json
is used to define shared settings for a number of projects that have the same set of dependencies as well as sharing pyright settings with vscode projects. It seems that project settings are ignored if thepyrightconfig.json
file already has"extraPaths"
defined:This is the same behaviour if I define
"python.analysis.extraPaths"
in the LSP-pyright global settings,pyrightconfig.json
takes precedence.If this is intentional is it possible to update the behaviour to be additive rather than exclusive?