How to set the python version in the LSP configuration? #15331
-
I'd like to provide a default python version (3.13) for I don't see anything like Ruff's configuration in lspconfig is described here: https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md#ruff but it says "Refer to the documentation for more details" in reference to the settings. That link takes me to https://docs.astral.sh/ruff/editors/ which lists a bunch of options but none for the We have a ruff.toml file in our repository but because we support multiple versions of Python that share this config file, I don't think I can can put Thanks in advance for reading and any advice you might have! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
We've currently only exposed a certain subset of settings which can be directly altered from an editor,
Can you say more about this to help me understand why it isn't possible to provide the target version in the config file? Would specifying the minimum supported Python version as the target version help? Alternatively, you could have a separate config file specifically for editor context which only specifies the |
Beta Was this translation helpful? Give feedback.
-
I think the simple answer is "because I didn't understand those options when I scanned them the first time." Thanks for the explanation, and apologies for wasting your time. |
Beta Was this translation helpful? Give feedback.
We've currently only exposed a certain subset of settings which can be directly altered from an editor,
target-version
is not one of them.Can you say more about this to help me understand why it isn't possible to provide the target version in the config file? Would specifying the minimum supported Python version as the target version help?
Alternatively, you could have a separate config file specifically for editor context which only specifies the
target-version
and provide that inconfiguration
and utilizeconf…