diff --git a/home/profiles/base/nvim/default.nix b/home/profiles/base/nvim/default.nix index a4b13466..bf016cf6 100644 --- a/home/profiles/base/nvim/default.nix +++ b/home/profiles/base/nvim/default.nix @@ -75,6 +75,11 @@ path = v; }) plugins); + + ruff-lsp = with pkgs; + python3Packages.ruff-lsp.overridePythonAttrs (o: { + propagatedBuildInputs = o.propagatedBuildInputs ++ [python3Packages.packaging]; + }); in lib.mkMerge [ { @@ -104,7 +109,7 @@ in nodePackages.graphql-language-service-cli nodePackages.typescript-language-server pyright - python3Packages.ruff-lsp + ruff-lsp stable.nodePackages.vscode-langservers-extracted typst-lsp diff --git a/home/profiles/base/nvim/lua/plugins/lsp/servers.lua b/home/profiles/base/nvim/lua/plugins/lsp/servers.lua index 8b4c3fd3..571d47a3 100644 --- a/home/profiles/base/nvim/lua/plugins/lsp/servers.lua +++ b/home/profiles/base/nvim/lua/plugins/lsp/servers.lua @@ -29,7 +29,11 @@ local servers = { local efm_sources = { formatters = { asmfmt = { formatCommand = "asmfmt", formatStdin = true }, - black = { formatCommand = "black --no-color -q -", formatStdin = true }, + black = { + formatCommand = "black --no-color -q -", + formatStdin = true, + rootMarkers = { "pyproject.toml", "requirements.txt", ".git" }, + }, latexindent = { formatCommand = "latexindent -l -", formatStdin = true }, prettier = { formatCanRange = true,