feat: update nixd config
parent
a5a784b2d5
commit
e45b2241fa
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"options": {
|
||||
"enable": true,
|
||||
"target": {
|
||||
"args": [],
|
||||
"installable": ".#nixosConfigurations.nixos-desktop.options"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -67,6 +67,7 @@
|
|||
|
||||
outputs = inputs@{ self, flake-parts, ... }:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
debug = true; # NOTE: for nixd
|
||||
imports = [
|
||||
inputs.pre-commit-hooks.flakeModule
|
||||
inputs.devshell.flakeModule
|
||||
|
|
|
@ -124,7 +124,6 @@ local servers = {
|
|||
"gleam",
|
||||
"gopls",
|
||||
"nil_ls",
|
||||
"nixd",
|
||||
"pylsp",
|
||||
"ruff_lsp",
|
||||
"templ",
|
||||
|
@ -134,6 +133,27 @@ for _, lsp in ipairs(servers) do
|
|||
lspconfig_setup(lsp, {})
|
||||
end
|
||||
|
||||
lspconfig_setup("nixd", {
|
||||
settings = {
|
||||
nixd = {
|
||||
nixpkgs = {
|
||||
expr = "import <nixpkgs> { }",
|
||||
},
|
||||
options = {
|
||||
nixos = {
|
||||
expr = '(builtins.getFlake ("git+file://" + toString ./.)).nixosConfigurations.nixos-desktop.options',
|
||||
},
|
||||
["flake-parts"] = {
|
||||
expr = '(builtins.getFlake ("git+file://" + toString ./.)).debug.options',
|
||||
},
|
||||
["flake-parts2"] = {
|
||||
expr = '(builtins.getFlake ("git+file://" + toString ./.)).currentSystem.options',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Add templ filetype
|
||||
vim.filetype.add({ extension = { templ = "templ" } })
|
||||
|
||||
|
|
Loading…
Reference in New Issue