about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2024-03-24 21:37:28 +0100
committerBaitinq <manuelpalenzuelamerino@gmail.com>2024-03-31 01:20:28 +0100
commitd66d75af27038fe7c5e538dbb7e5d1a2c574d965 (patch)
tree265b685d0d92e2045a1c88e9addb820f8b544a6d
parentDotfiles: Nvim: Add lspkind plugin (diff)
downloadnixos-config-d66d75af27038fe7c5e538dbb7e5d1a2c574d965.tar.gz
nixos-config-d66d75af27038fe7c5e538dbb7e5d1a2c574d965.tar.bz2
nixos-config-d66d75af27038fe7c5e538dbb7e5d1a2c574d965.zip
Dotfiles: Nvim: Use neovim nightly's (0.10) inlay hints
-rw-r--r--dotfiles/nvim/init.lua3
-rw-r--r--flake.lockbin8247 -> 13104 bytes
-rw-r--r--flake.nix2
-rw-r--r--hosts/configuration.nix2
-rw-r--r--hosts/default.nix1
-rw-r--r--overlays/base/default.nix8
6 files changed, 11 insertions, 5 deletions
diff --git a/dotfiles/nvim/init.lua b/dotfiles/nvim/init.lua
index 6439b0d..71f62db 100644
--- a/dotfiles/nvim/init.lua
+++ b/dotfiles/nvim/init.lua
@@ -523,6 +523,9 @@ require('lazy').setup({
           --
           -- When you move your cursor, the highlights will be cleared (the second autocommand).
           local client = vim.lsp.get_client_by_id(event.data.client_id)
+          if client and client.server_capabilities.inlayHintProvider then
+            vim.lsp.inlay_hint.enable(0, true)
+          end
           if client and client.server_capabilities.documentHighlightProvider then
             vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
               buffer = event.buf,
diff --git a/flake.lock b/flake.lock
index cca920e..5dbb89e 100644
--- a/flake.lock
+++ b/flake.lock
Binary files differdiff --git a/flake.nix b/flake.nix
index 8aa2b4f..6540fe1 100644
--- a/flake.nix
+++ b/flake.nix
@@ -25,6 +25,8 @@
 
     nur.url = "github:nix-community/NUR";
 
+    neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
+
     nixtest.url = "github:jetpack-io/nixtest";
 
     nix-index.url = "github:Mic92/nix-index-database";
diff --git a/hosts/configuration.nix b/hosts/configuration.nix
index 05525c2..8725176 100644
--- a/hosts/configuration.nix
+++ b/hosts/configuration.nix
@@ -112,7 +112,7 @@
     gitFull
     git-crypt
     tmux
-    neovim
+    neovim-nightly
     htop
     pfetch
     unzip
diff --git a/hosts/default.nix b/hosts/default.nix
index 05a59d2..2990da3 100644
--- a/hosts/default.nix
+++ b/hosts/default.nix
@@ -11,6 +11,7 @@ let
         };
         overlays = [
           inputs.nur.overlay
+          inputs.neovim-nightly-overlay.overlay
           (import ../packages)
           (import ../overlays)
         ] ++ extraOverlays;
diff --git a/overlays/base/default.nix b/overlays/base/default.nix
index f17f9b7..8f82d8c 100644
--- a/overlays/base/default.nix
+++ b/overlays/base/default.nix
@@ -89,10 +89,10 @@ final: prev:
     postBuild = "wrapProgram $out/bin/emacs --prefix PATH : ${prev.lib.makeBinPath [ prev.nodejs prev.ripgrep ]}";
   });
 
-  neovim = (prev.symlinkJoin {
-    inherit (prev.neovim) name;
-    version = "";
-    paths = [ prev.neovim ];
+  neovim-nightly = (prev.symlinkJoin {
+    inherit (prev.neovim-nightly) name;
+    inherit (prev.neovim-nightly) version;
+    paths = [ prev.neovim-nightly ];
     nativeBuildInputs = [ prev.makeBinaryWrapper ];
     postBuild = "wrapProgram $out/bin/nvim --prefix PATH : ${prev.lib.makeBinPath [ prev.nodejs prev.ripgrep ]}";
   });