Getting ruff working in nvim

I want to use my nvim config for both windows and nixos, which is why mason is included in there, but mason doesn’t seem to always work with nixos; at least not for binaries, which does ofc make sense.

I currently have my nvim config as a derivation and I call the init.lua from home-manager and add the necessary language servers:

and in my init.lua I check $NAME to make sure i am on nixos and not windows and based on that setup lspconfig.

this seems to work so far for lua-ls and pyright, but even though I can’t see any errors for ruff under :LspInfo ruff doesn’t seem to do anything.

(Also would be generally glad about feedback to my nvim setup in nix)

the issue was a nix-shell I was in.

the current ruff-lsp version 0.0.42 from nixos-unstable is apparently not compatible with the ruff version that my nix-shell setup, which is 0.1.4.

the latest version is already merged to master ruff-lsp: 0.0.42 -> 0.0.45 by GaetanLepage · Pull Request #266606 · NixOS/nixpkgs · GitHub