From 9787880ec55e4ef31f139aa12b91fc57ece07272 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Sat, 31 Aug 2024 03:58:39 -0500 Subject: [PATCH] refactor(nvim): replace `nil_ls` with `nixd` --- .../.config/nvim/lua/plugins/configs/lsp.lua | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/users/price/dots/.config/nvim/lua/plugins/configs/lsp.lua b/users/price/dots/.config/nvim/lua/plugins/configs/lsp.lua index b37d25c2..0c61e1ad 100644 --- a/users/price/dots/.config/nvim/lua/plugins/configs/lsp.lua +++ b/users/price/dots/.config/nvim/lua/plugins/configs/lsp.lua @@ -483,15 +483,22 @@ return { dap_debug_gui = true, }) - lspconfig.nil_ls.setup({ + -- TODO: Make this more general, this will support my own NixOS config and dot file + -- stuff, but not generally usable for other projects. Would be good to use something + -- like `.nvim.lua` for this or whatever else works 🤷. + lspconfig.nixd.setup({ + cmd = { "nixd", "--semantic-tokens=false" }, settings = { - ["nil"] = { - formatting = { command = { "nixfmt" } }, - nix = { - maxMemoryMB = 60000, - flake = { - autoArchive = true, - autoEvalInputs = true, + nixd = { + nixpkgs = { + expr = "import { }", + }, + formatting = { + command = { "nixfmt" }, + }, + options = { + home_manager = { + expr = '(builtins.getFlake ("git+file://" + toString ./.)).homeConfigurations.price.options', }, }, },