emacs-lsp / lsp-pyright

lsp-mode :heart: pyright
https://emacs-lsp.github.io/lsp-pyright
GNU General Public License v3.0
291 stars 25 forks source link

feat: provide a custom variable for typeCheckingMode #104

Closed kassick closed 1 month ago

wyuenho commented 1 month ago

I specifically removed this in #96 , why'd you put it back? You are supposed to configure this settings in your pyproject.toml or pyrightconfig.json file, otherwise directly setting it when connecting to the server will override the project setting.

kassick commented 1 month ago

In pyright (and basedpyright too), if you define typeCheckingMode in your pyproject.toml, the custom variable will be ignored (at least that's what I observed here in a quick test), so having the custom variable should not be an issue if you want to have per-project values.

The custom variable is specially useful with basedpyright -- the default is "all", which is quite overwhelming in the editor.

wyuenho commented 1 month ago

I see, the situation seems to have changed shortly after I've removed all these duplicate settings.

kassick commented 1 month ago

Ah, I see -- having this setting in the editor overriding the ones in the config file is indeed bad, I see now why the previous PR.