From 79ed7d929b54c682d9470b25516ae6372464fa3f Mon Sep 17 00:00:00 2001 From: Tigor Hutasuhut Date: Wed, 12 Jun 2024 19:52:07 +0700 Subject: [PATCH] nvim: added nil ls config --- home/config/nvim/default.nix | 5 +++++ home/config/nvim/lua/config/autocmds.lua | 13 +++++++++++++ 2 files changed, 18 insertions(+) diff --git a/home/config/nvim/default.nix b/home/config/nvim/default.nix index d654d58..29be8b5 100644 --- a/home/config/nvim/default.nix +++ b/home/config/nvim/default.nix @@ -11,6 +11,8 @@ }; home.packages = with pkgs; [ + stylua + lua-language-server docker-compose-language-service emmet-ls silicon # For code screenshots @@ -20,6 +22,9 @@ gotests iferr curl + cargo + nixpkgs-fmt + nil gcc python3 diff --git a/home/config/nvim/lua/config/autocmds.lua b/home/config/nvim/lua/config/autocmds.lua index af95f49..0a0f420 100644 --- a/home/config/nvim/lua/config/autocmds.lua +++ b/home/config/nvim/lua/config/autocmds.lua @@ -25,3 +25,16 @@ vim.filetype.add { templ = "templ", }, } + +require("lspconfig").nil_ls.setup { + settings = { + ["nil"] = { + nix = { + flake = { + autoArchive = true, + autoEvalInputs = vim.fn.getenv "NIL_LS_NIX_AUTO_EVAL_INPUTS" ~= vim.NIL, + }, + }, + }, + }, +}