fix: nil-ls popup in nvim

This commit is contained in:
Anish Lakhwara 2025-12-24 17:27:26 -08:00
parent 3c8dfd58a1
commit 1ec0b1bbe5
2 changed files with 27 additions and 10 deletions

View file

@ -737,11 +737,11 @@
"treefmt-nix": "treefmt-nix_2"
},
"locked": {
"lastModified": 1765594737,
"narHash": "sha256-9r+CxptJlqTdREkSHA1pxc3oZYnpgYNkAymkQLB0R8w=",
"lastModified": 1766585760,
"narHash": "sha256-dMOdwzCdJeJHRVT2udM3cziJAsxMOO0wHjeZ2WWhzk0=",
"owner": "numtide",
"repo": "llm-agents.nix",
"rev": "fb30f7dd63c0c7227c4b80a4dbfb6765f4b9a900",
"rev": "98185694332ee75319f8139fcc751eea9426bde7",
"type": "github"
},
"original": {
@ -1017,11 +1017,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1765425892,
"narHash": "sha256-jlQpSkg2sK6IJVzTQBDyRxQZgKADC2HKMRfGCSgNMHo=",
"lastModified": 1766532406,
"narHash": "sha256-acLU/ag9VEoKkzOD202QASX25nG1eArXg5A0mHjKgxM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5d6bdbddb4695a62f0d00a3620b37a15275a5093",
"rev": "8142186f001295e5a3239f485c8a49bf2de2695a",
"type": "github"
},
"original": {
@ -1431,11 +1431,11 @@
]
},
"locked": {
"lastModified": 1762938485,
"narHash": "sha256-AlEObg0syDl+Spi4LsZIBrjw+snSVU4T8MOeuZJUJjM=",
"lastModified": 1766000401,
"narHash": "sha256-+cqN4PJz9y0JQXfAK5J1drd0U05D5fcAGhzhfVrDlsI=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "5b4ee75aeefd1e2d5a1cc43cf6ba65eba75e83e4",
"rev": "42d96e75aa56a3f70cab7e7dc4a32868db28e8fd",
"type": "github"
},
"original": {

View file

@ -709,7 +709,7 @@ in
}
}
local servers = { 'clojure_lsp', 'terraform_lsp', 'zls', 'pyright', 'rust_analyzer', 'ts_ls', 'lua_ls', 'nil_ls', 'gopls', 'bashls'}
local servers = { 'clojure_lsp', 'terraform_lsp', 'zls', 'pyright', 'rust_analyzer', 'ts_ls', 'lua_ls', 'gopls', 'bashls'}
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup {
on_attach = function(client, bufnr)
@ -719,6 +719,23 @@ in
}
end
-- nil_ls needs custom settings to disable autoArchive prompt
lspconfig['nil_ls'].setup {
on_attach = function(client, bufnr)
navic.attach(client, bufnr)
end,
capabilities = capabilities,
settings = {
['nil'] = {
nix = {
flake = {
autoArchive = false,
},
},
},
},
}
-- fennel-ls doesn't support navic
lspconfig['fennel-ls'].setup {
on_attach = function(client, bufnr)