Using kate 25.08.2 via flatpak.
Hello, I’m trying to configure the LSP settings in kate to make them the same as my configuration in Helix. I want the ruff linter to very strict for personal projects. I read the blog post of Kate and Python Language Server: Basedpyright but used a slightly different approach. I used uv tool install to install basedpyright, basedpyright-langserver, ruff and pycodestyle. These applications are now in my PATH. I copied the client settings example from the blog post, but replaced “pylsp_in_env”, by “basedpyright-langserver”, “–stdio”, and changed the “analysis” settings for basedpyright to
"analysis": {
"autoSearchPaths": true,
"typeCheckingMode": "basic",
"diagnosticMode": "openFilesOnly",
"autoImportCompletions": true
}
These are the settings I have in Helix.
What I do not understand is how I can configure the settings for the ruff linter and formatter.
For the ruff linter configuration in Helix the most important setting is:
select = [“E”, “F”, “W”, “B”, “I”, “RUF”, “N”, “LOG”, “ERA”, “W”, “D”, “UP”, “ANN”, “ASYNC”, “S”, “RET”, “TCH”, “ARG”, “PTH”, “DOC”]
I have no idea how to add this to the Kate LSP settings. How do I configure ruff? Do I need an external file? I tried creating a ruff.toml file, but that seems to be ignored.
If the LSP setting could reference a ruff.toml file on a per-project base, that would be ideal. In my personal projects I want to be very strict, but in other projects developers might want to agree on which checks they want to include. The same for changes they want to allow for the ruff formatter. And when I need to contribute to a project that does not respect any rules, I’ld like to use a config with all checks off.
Any help is very appreciated. Thanks, Fred