From 5bdb2ce9280e1d30570140f47898266ab773ac39 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Thu, 11 Jul 2024 05:09:03 -0300 Subject: [PATCH] neovim: use nixd for nix lang lsp --- programs/neovim/default.nix | 2 +- programs/neovim/lua/plugins/astrolsp.lua | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/programs/neovim/default.nix b/programs/neovim/default.nix index f857bae..212f6be 100644 --- a/programs/neovim/default.nix +++ b/programs/neovim/default.nix @@ -30,7 +30,7 @@ prettierd # Nix - nil + nixd nixfmt-rfc-style # TypeScript diff --git a/programs/neovim/lua/plugins/astrolsp.lua b/programs/neovim/lua/plugins/astrolsp.lua index 9d25c02..7c28eb8 100644 --- a/programs/neovim/lua/plugins/astrolsp.lua +++ b/programs/neovim/lua/plugins/astrolsp.lua @@ -55,7 +55,7 @@ return { "jsonls", "lua_ls", "marksman", - "nil_ls", + "nixd", "rust_analyzer", "svelte", "taplo", @@ -67,6 +67,21 @@ return { ---@diagnostic disable: missing-fields config = { -- clangd = { capabilities = { offsetEncoding = "utf-8" } }, + nixd = { + settings = { + nixd = { + options = { + nixos = { + expr = '(builtins.getFlake ("git+file:///home/wizardlink/.system")).nixosConfigurations.nixos.options', + }, + home_manager = { + expr = + '(builtins.getFlake ("git+file:///home/wizardlink/.system")).homeConfigurations.wizardlink.options', + }, + }, + }, + }, + }, }, -- customize how language servers are attached handlers = {