From ba18d6254912ad5dd70aaf193ebb4683fa9e4c6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jalil=20David=20Salam=C3=A9=20Messina?= Date: Tue, 10 Dec 2024 23:20:39 +0100 Subject: [PATCH] fix(nvim): switch to basedpyright And set up the rootDir setting for it, as it seems to need it. --- nvim/dev-plugins.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nvim/dev-plugins.nix b/nvim/dev-plugins.nix index b29f66b..00a46e7 100644 --- a/nvim/dev-plugins.nix +++ b/nvim/dev-plugins.nix @@ -9,13 +9,13 @@ let inherit (helpers) enableExceptInTests; cfg = config.jhome.nvim; enabledLSPs = [ + "basedpyright" "bashls" "clangd" # "html" # Not writing html "jsonls" "marksman" "nixd" - "pyright" "ruff" "taplo" # "texlab" # Not using it @@ -45,6 +45,13 @@ in lsp = { enable = true; servers = { + # Pyright needs to have the project root set? + basedpyright.rootDir = # lua + '' + function() + return vim.fs.root(0, {'flake.nix', '.git', '.jj', 'pyproject.toml', 'setup.py'}) + end + ''; bashls.package = lib.mkDefault pkgs.bash-language-server; # Adds ~2 GiB, install in a devShell instead clangd.package = lib.mkDefault null; -- 2.47.0