williamboman / nvim-lsp-installer

Further development has moved to https://github.com/williamboman/mason.nvim!
https://github.com/williamboman/mason.nvim
Apache License 2.0
2k stars 123 forks source link

Can't change pyright settings: python.analysis.typeCheckingMode doesn't turn off #451

Closed bryangeplant closed 2 years ago

bryangeplant commented 2 years ago

Problem description

Can't change the setting, the server schema says that its still on "basic" instead of the "off" that i've defined.

Neovim version (>= 0.6)

NVIM v0.7.0-dev+665-g4e352ecc4 Build type: RelWithDebInfo LuaJIT 2.0.5

Operating system/version

Linux project-jenova 5.13.19-2-MANJARO #1 SMP PREEMPT Sun Sep 19 21:31:53 UTC 2021 x86_64 GNU/Linux

I've recently downloaded the latest plugin version of both nvim-lsp-installer and nvim-lspconfig

Affected language servers

pyright

Actual behavior

I've defined the settings as


    if server.name == 'pyright' then
        opt['settings'] = {
                python = {
                        analysis = {
                                typeCheckingMode = "off"
                            }
                    }
            }
    end

It shouldve been turned off.

Expected behavior

Doesnt turn off. image

Healthcheck output

All ok

Screenshots

No response

williamboman commented 2 years ago

Hello! Ah, the schema that is displayed there is static. It only shows the configuration schema that the server provides, it doesn't apply any changes you've made in your own settings on top of that.

Apart from that UI not showing your custom settings, does it not work?

tomasgareau commented 2 years ago

One thing that might be worth checking @bryangeplant (or other people who bump into this) is that you don't have this setting set in pyproject.toml: with

[tool.pyright]
typeCheckingMode = "strict"

I noticed that the pyproject.toml setting was overriding my lsp setting.