feat: Switch to nil LSP for code actions

I love that nixd gets more options but I really need the code actions.
This commit is contained in:
punkfairie 2025-01-13 18:28:50 -08:00
parent 377d139fff
commit 63eb87800f
No known key found for this signature in database
GPG key ID: B3C5488E9A1A7CA6
5 changed files with 20 additions and 108 deletions

View file

@ -108,39 +108,6 @@
"type": "indirect"
}
},
"flake-parts_4": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_2"
},
"locked": {
"lastModified": 1733312601,
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-root": {
"locked": {
"lastModified": 1723604017,
"narHash": "sha256-rBtQ8gg+Dn4Sx/s+pvjdq3CB2wQNzx9XGFq/JVGCB6k=",
"owner": "srid",
"repo": "flake-root",
"rev": "b759a56851e10cb13f6b8e5698af7b59c44be26e",
"type": "github"
},
"original": {
"owner": "srid",
"repo": "flake-root",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
@ -383,27 +350,6 @@
"type": "github"
}
},
"nixd": {
"inputs": {
"flake-parts": "flake-parts_4",
"flake-root": "flake-root",
"nixpkgs": "nixpkgs_2",
"treefmt-nix": "treefmt-nix_2"
},
"locked": {
"lastModified": 1736350641,
"narHash": "sha256-7tocojT95MzQb6BczrFd+W7CyNxGqe5Qg8aicqA+yLI=",
"owner": "nix-community",
"repo": "nixd",
"rev": "6e581414b2f4c7834aef340118ea7134de98aae3",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixd",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1718714799,
@ -432,18 +378,6 @@
"url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz"
}
},
"nixpkgs-lib_2": {
"locked": {
"lastModified": 1733096140,
"narHash": "sha256-1qRH7uAUsyQI7R1Uwl4T+XvdNv778H0Nb5njNrqvylY=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1720386169,
@ -461,22 +395,6 @@
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1734435836,
"narHash": "sha256-kMBQ5PRiFLagltK0sH+08aiNt3zGERC2297iB6vrvlU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4989a246d7a390a859852baddb1013f825435cee",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1736701207,
"narHash": "sha256-jG/+MvjVY7SlTakzZ2fJ5dC3V1PrKKrUEOEE30jrOKA=",
@ -515,8 +433,7 @@
"neotab-nvim": "neotab-nvim",
"neovim-nightly": "neovim-nightly",
"nerdy-nvim": "nerdy-nvim",
"nixd": "nixd",
"nixpkgs": "nixpkgs_3",
"nixpkgs": "nixpkgs_2",
"nvim-emmet": "nvim-emmet"
}
},
@ -555,27 +472,6 @@
"repo": "treefmt-nix",
"type": "github"
}
},
"treefmt-nix_2": {
"inputs": {
"nixpkgs": [
"nixd",
"nixpkgs"
]
},
"locked": {
"lastModified": 1734704479,
"narHash": "sha256-MMi74+WckoyEWBRcg/oaGRvXC9BVVxDZNRMpL+72wBI=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "65712f5af67234dad91a5a4baee986a8b62dbf8f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
}
},
"root": "root",

View file

@ -26,7 +26,7 @@
flake = false;
};
nixd.url = "github:nix-community/nixd";
# nixd.url = "github:nix-community/nixd";
};
outputs = inputs @ {

View file

@ -152,7 +152,8 @@ with final.pkgs.lib; let
bash-language-server
emmet-language-server
lua-language-server
inputs.nixd.packages.${pkgs.system}.nixd
nil
# inputs.nixd.packages.${pkgs.system}.nixd
phpactor
stylelint-lsp
taplo

14
nvim/lsp/nil.lua Normal file
View file

@ -0,0 +1,14 @@
return {
cmd = { 'nil' },
filetypes = { 'nix' },
root_markers = { 'flake.nix', '.git' },
settings = {
['nil'] = {
flake = {
autoArchive = true,
autoEvalInputs = true,
},
},
},
}

View file

@ -83,7 +83,8 @@ vim.lsp.enable({
'bash-language-server',
'emmet-language-server',
'lua-language-server',
'nixd',
'nil',
-- 'nixd',
'phpactor',
'stylelint-lsp',
'taplo',