From b38acff1250fa1daa554a1d464e657a5821edc54 Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Mon, 26 Sep 2022 22:03:29 +0200 Subject: [PATCH] nvim: Add nil_ls --- flake.lock | 12 ++++++------ home/config/nvim/plugins/lsp.fnl | 4 +++- home/programs/nvim/default.nix | 1 + home/programs/nvim/plugins.nix | 10 +++++----- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index 3d30732..32c2878 100644 --- a/flake.lock +++ b/flake.lock @@ -27,11 +27,11 @@ ] }, "locked": { - "lastModified": 1664143588, - "narHash": "sha256-I1qaa8VMISprKulco2bxiIJUaz1NGiKmlsQuM996yzM=", + "lastModified": 1664210064, + "narHash": "sha256-df6nKVZe/yAhmJ9csirTPahc0dldwm3HBhCVNA6qWr0=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "95ba7e548d55e74c36369dbd6a4bfe99a543c835", + "rev": "02d2551c927b7d65ded1b3c7cd13da5cc7ae3fcf", "type": "github" }, "original": { @@ -79,11 +79,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1664146938, - "narHash": "sha256-fIvsJ3qWiD6o3qH9iU66OsL8uG5C1FGXcuaNEctJv8M=", + "lastModified": 1664217366, + "narHash": "sha256-YsqVv0D4YIXjeaz37V4/aRZrkAtEMZpFTn+tduI5fAM=", "owner": "nix-community", "repo": "home-manager", - "rev": "9e7394523eb4f298528d457e316fc752bdf07151", + "rev": "65b65ce5ef08d54bc09336fe3f35e33be487e2fe", "type": "github" }, "original": { diff --git a/home/config/nvim/plugins/lsp.fnl b/home/config/nvim/plugins/lsp.fnl index 89968b8..468593f 100644 --- a/home/config/nvim/plugins/lsp.fnl +++ b/home/config/nvim/plugins/lsp.fnl @@ -4,7 +4,8 @@ diagnostic (require :nifoc.diagnostic) formatting (require :nifoc.formatting)] (fn custom-attach [client bufnr] - (navic.attach client bufnr) + (when (client.supports_method :textDocument/documentSymbol) + (navic.attach client bufnr)) (diagnostic.maybe-enable-lsp client bufnr) (formatting.maybe-enable-lsp client bufnr)) @@ -32,6 +33,7 @@ :erlangls :eslint :html + :nil_ls :rnix :sqls :svelte diff --git a/home/programs/nvim/default.nix b/home/programs/nvim/default.nix index 097a7e1..5d2a329 100644 --- a/home/programs/nvim/default.nix +++ b/home/programs/nvim/default.nix @@ -24,6 +24,7 @@ in ripgrep # LSP + nil nodePackages.bash-language-server nodePackages.dockerfile-language-server-nodejs nodePackages.svelte-language-server diff --git a/home/programs/nvim/plugins.nix b/home/programs/nvim/plugins.nix index b9c92d9..8a6f15e 100644 --- a/home/programs/nvim/plugins.nix +++ b/home/programs/nvim/plugins.nix @@ -289,8 +289,8 @@ rec { src = pkgs.fetchFromGitHub { owner = "numtostr"; repo = "comment.nvim"; - rev = "256cea0082c404cdced10319e9fa7580d33cf255"; - sha256 = "188wbh4wx256sna6b8m3hrsdfv529g6n928l220sy65kkv2dvj6k"; + rev = "7cc86127d30f7001a6e83c8b72656f17a67bc55f"; + sha256 = "1jl2wwr8ssszgkynnkxpz2c57mw7yapvrc892jrnkbkj6lv7h8vi"; fetchSubmodules = false; }; }; @@ -483,12 +483,12 @@ rec { }; nvim-surround = pkgs.vimUtils.buildVimPluginFrom2Nix { pname = "nvim-surround"; - version = "2022-09-05"; + version = "2022-09-26"; src = pkgs.fetchFromGitHub { owner = "kylechui"; repo = "nvim-surround"; - rev = "d91787d5a716623be7cec3be23c06c0856dc21b8"; - sha256 = "054kpdx7s0pj49yqf5111f1dsfh80js6fxlma1r0mds5q7vw5mav"; + rev = "a0b35fd410e16f00543e81dbb6c52c723f49717e"; + sha256 = "1krsgy0x3x9bml8iszd0svz9iqmdn73yn15n49ffznq3vj3gafr2"; fetchSubmodules = false; }; };