Browse Source

nixpkgs/neovim: update flake.lock and plugins

Thomas Dy 1 month ago
parent
commit
8398bf7425

+ 6 - 6
.config/nixpkgs/neovim/flake.lock

@@ -9,11 +9,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1747813658,
-        "narHash": "sha256-WiS4CZn8OvU01MvSqveZt2FhKznu2FbIlvKP8dZ2cm4=",
+        "lastModified": 1753811898,
+        "narHash": "sha256-MNwd9v1dLmLdqDlRjWRLrqk93FNQJmzhiD6fKns9Q8Q=",
         "owner": "Saghen",
         "repo": "blink.cmp",
-        "rev": "196711b89a97c953877d6c257c62f18920a970f3",
+        "rev": "a0bcedefce8d74179d0f2401d9915eaaf16974ce",
         "type": "github"
       },
       "original": {
@@ -82,11 +82,11 @@
     },
     "nixpkgs": {
       "locked": {
-        "lastModified": 1747920628,
-        "narHash": "sha256-IlAuXnIi+ZmyS89tt1YOFDCv7FKs9bNBHd3MXMp8PxE=",
+        "lastModified": 1753750875,
+        "narHash": "sha256-J1P0aQymehe8AHsID9wwoMjbaYrIB2eH5HftoXhF9xk=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "e314d5c6d3b3a0f40ec5bcbc007b0cbe412f48ae",
+        "rev": "871381d997e4a063f25a3994ce8a9ac595246610",
         "type": "github"
       },
       "original": {

+ 6 - 0
.config/nixpkgs/neovim/flake.nix

@@ -18,6 +18,12 @@
           overlays = [(final: prev: {
             node-lsp = final.callPackage ./node-lsp {};
             blink-cmp = blink-cmp.packages.${system}.blink-cmp;
+            neovim-unwrapped = prev.neovim-unwrapped.overrideAttrs (attrs: attrs // {
+              patches = (attrs.patches or []) ++ [
+                # fix floating windows not closing when going to another file
+                ./neovim-34946.patch
+              ];
+            });
           })];
         };
       in

+ 60 - 0
.config/nixpkgs/neovim/neovim-34946.patch

@@ -0,0 +1,60 @@
+From cad0c71adc30ca4d358cec3146495b340b2e068e Mon Sep 17 00:00:00 2001
+From: Tronikel <contactdonatas@gmail.com>
+Date: Tue, 15 Jul 2025 18:18:50 +0300
+Subject: [PATCH] fix: close floating preview window correctly
+
+---
+ runtime/lua/vim/lsp/util.lua | 13 +++++++------
+ 1 file changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua
+index db221ddc6889e6..28d00d6cd307f2 100644
+--- a/runtime/lua/vim/lsp/util.lua
++++ b/runtime/lua/vim/lsp/util.lua
+@@ -1418,9 +1418,10 @@ end
+ ---
+ ---@param events table list of events
+ ---@param winnr integer window id of preview window
+----@param bufnrs table list of buffers where the preview window will remain visible
++---@param floating_bufnr integer floating preview buffer
++---@param bufnr integer buffer that opened the floating preview buffer
+ ---@see autocmd-events
+-local function close_preview_autocmd(events, winnr, bufnrs)
++local function close_preview_autocmd(events, winnr, floating_bufnr, bufnr)
+   local augroup = api.nvim_create_augroup('nvim.preview_window_' .. winnr, {
+     clear = true,
+   })
+@@ -1429,13 +1430,13 @@ local function close_preview_autocmd(events, winnr, bufnrs)
+   -- the floating window buffer or the buffer that spawned it
+   api.nvim_create_autocmd('BufLeave', {
+     group = augroup,
+-    buffer = bufnrs[1],
++    buffer = bufnr,
+     callback = function()
+       vim.schedule(function()
+         -- When jumping to the quickfix window from the preview window,
+         -- do not close the preview window.
+         if api.nvim_get_option_value('filetype', { buf = 0 }) ~= 'qf' then
+-          close_preview_window(winnr, bufnrs)
++          close_preview_window(winnr, { floating_bufnr, bufnr })
+         end
+       end)
+     end,
+@@ -1444,7 +1445,7 @@ local function close_preview_autocmd(events, winnr, bufnrs)
+   if #events > 0 then
+     api.nvim_create_autocmd(events, {
+       group = augroup,
+-      buffer = bufnrs[2],
++      buffer = bufnr,
+       callback = function()
+         close_preview_window(winnr)
+       end,
+@@ -1690,7 +1691,7 @@ function M.open_floating_preview(contents, syntax, opts)
+       '<cmd>bdelete<cr>',
+       { silent = true, noremap = true, nowait = true }
+     )
+-    close_preview_autocmd(opts.close_events, floating_winnr, { floating_bufnr, bufnr })
++    close_preview_autocmd(opts.close_events, floating_winnr, floating_bufnr, bufnr)
+ 
+     -- save focus_id
+     if opts.focus_id then

+ 4 - 0
.config/nixpkgs/neovim/plugins/default.nix

@@ -12,6 +12,10 @@ let
       # JSX expression
       patches = [ ./treesitter-jsx.patch ];
     };
+
+    "mistweaverco/kulala.nvim" = {
+      patches = [ ./kulala-treesitter.patch ];
+    };
   };
 
   buildPlugin = name: spec:

+ 16 - 0
.config/nixpkgs/neovim/plugins/kulala-treesitter.patch

@@ -0,0 +1,16 @@
+diff --git a/lua/kulala/config/init.lua b/lua/kulala/config/init.lua
+index f680379..6a81674 100644
+--- a/lua/kulala/config/init.lua
++++ b/lua/kulala/config/init.lua
+@@ -116,6 +116,11 @@ local function setup_treesitter_master()
+ end
+ 
+ local function set_kulala_parser()
++  if vim.treesitter.language.add("kulala_http") then
++    vim.treesitter.language.register("kulala_http", { "http", "rest" })
++    return
++  end
++
+   local parsers = vim.F.npcall(require, "nvim-treesitter.parsers")
+ 
+   if not parsers then

+ 24 - 24
.config/nixpkgs/neovim/plugins/sources.json

@@ -4,20 +4,20 @@
     "sha256": "0wqxdjgplf04nq428ialw1w03f8nh5vb629a17vl5gc9gf3zfanq"
   },
   "tpope/vim-fugitive": {
-    "rev": "4a745ea72fa93bb15dd077109afbb3d1809383f2",
-    "sha256": "188l24j7j57hgs02gy6ch165agyrwr4g034c5j3m1vnw14vmw2yl"
+    "rev": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4",
+    "sha256": "1fk02wb2g52lqxxp1gx551bbv7nmambwjiqfgcp4ypn2n4wnhzxv"
   },
   "tpope/vim-rhubarb": {
-    "rev": "386daa2e9d98e23e27ad089afcbe5c5a903e488d",
-    "sha256": "1gm9ylz752sx7kpdihp6fm61sbfss8a5dd43jzci7i44x27z7ly3"
+    "rev": "5496d7c94581c4c9ad7430357449bb57fc59f501",
+    "sha256": "0iv2yc0246yanziic7fpwgkqfmql2khjkfbbrva17n4niah3cqf7"
   },
   "tpope/vim-abolish": {
     "rev": "dcbfe065297d31823561ba787f51056c147aa682",
     "sha256": "1yvpk0cnsx1b1q2wp52fv4mj71w8ssz4dcbbdix65m8qna6d0m9h"
   },
   "mbbill/undotree": {
-    "rev": "b951b87b46c34356d44aa71886aecf9dd7f5788a",
-    "sha256": "0vp4wl4kiby7dlchki975fq682sw8c1vr9c6nhcndmxyhx7ghrqw"
+    "rev": "28f2f54a34baff90ea6f4a735ef1813ad875c743",
+    "sha256": "0k9qfp64rbwy1lc62x0vkwfl3qlx8633lfbhqxkf64yqwi81ysp5"
   },
   "Wansmer/treesj": {
     "rev": "3b4a2bc42738a63de17e7485d4cc5e49970ddbcc",
@@ -32,32 +32,32 @@
     "sha256": "137a05qwbpcrcrfj4az7dwx5a43yyfib4crx1hi8bhjx9j5gqav7"
   },
   "nvim-lua/plenary.nvim": {
-    "rev": "857c5ac632080dba10aae49dba902ce3abf91b35",
-    "sha256": "0jxx9nfga7z87v78cifglqs8w4mrpf99wcp483kb0hbv6537jmgh"
+    "rev": "b9fd5226c2f76c951fc8ed5923d85e4de065e509",
+    "sha256": "1kg043h7dqcrqqgg8pp6hsldx7jdhlh8qwad2kkckia191xgnjgm"
   },
   "echasnovski/mini.nvim": {
-    "rev": "14ce72476995255fc5cb919da8067f65865e1225",
-    "sha256": "1g0bqsgidbn4nm0wdnax6hnlvkmdq7df9lw95ng03w6rgwyz3fdr"
+    "rev": "c122e852517adaf7257688e435369c050da113b1",
+    "sha256": "1klj676spa0m0j2as1bv9ais3n37213vmqa1plydfa2jxg72l08p"
   },
   "neovim/nvim-lspconfig": {
-    "rev": "562487bc108bf73c2493f9e701b9334b48163216",
-    "sha256": "0v13snamlh42icj5yv6bbq52h5npbimyqfyckhzg5pwyyr2whyk2"
+    "rev": "3db16ceeea947517f0dc1404c24dcb5ab0c91d26",
+    "sha256": "0gam1rxqkxksayblhj1i7jkh4sqjp6lpvyb1psmrhkryj6967ir2"
   },
   "nvim-treesitter/nvim-treesitter-textobjects": {
-    "rev": "0f051e9813a36481f48ca1f833897210dbcfffde",
-    "sha256": "1vy2ihqknjrbmn4lw81hvhhqdg1pc2wc32ir96506bb3d273am7b"
+    "rev": "71385f191ec06ffc60e80e6b0c9a9d5daed4824c",
+    "sha256": "0pp8s0wljwhc93jp47ad4pigqm8q7v173374c1vpydhx09qwl4ga"
   },
   "sainnhe/sonokai": {
-    "rev": "f59c796780655c3b9da442d310ad2f2d735f2e56",
-    "sha256": "0sxf6z3yzg4hggad172ljy6vxpnfll9q84pqa7n40m26g2alg29x"
+    "rev": "5baf26496047788dc000e9287e5ceb7420b2f42e",
+    "sha256": "0qnnq90kwg3kn8br63kbzhvrc862g5r7i3k0djs6d63x5hin94x2"
   },
   "LnL7/vim-nix": {
     "rev": "7235c7ce2cea530cb6b59bc3e46d4bfe917d15c8",
     "sha256": "109narpbw9kbih7ai49p1zw7j2bj7nzpk3n02z80jcbgb48zqs8y"
   },
   "nvim-treesitter/nvim-treesitter": {
-    "rev": "066fd6505377e3fd4aa219e61ce94c2b8bdb0b79",
-    "sha256": "0ial9z35b3918l4q8gqdng50ifal0a4dcgdsr92nrnm2b0hz11kd"
+    "rev": "42fc28ba918343ebfd5565147a42a26580579482",
+    "sha256": "1ck1qslxwi18qxrga68blvk1dg9j4jn65xiw8snq5pk06waksnq9"
   },
   "bfredl/nvim-luadev": {
     "optional": true,
@@ -65,15 +65,15 @@
     "sha256": "0pvb25bdmx4hxs3g7pkdqfjg3qpnr9p5szzbqqwaw3lbdnbyykzy"
   },
   "nvim-treesitter/nvim-treesitter-context": {
-    "rev": "4976d8b90401cba9b85f6861e4e5a6edef2f2086",
-    "sha256": "1lyfc196vsivkf8hn2s05m7x91nghw65dxzssjw3vyrzlc1jpp9d"
+    "rev": "02fd97c803962108d129cf42e05adc5eff7f89c1",
+    "sha256": "1jglqdc6sc593841694sn9p2hswg2iqifwjij6d553l228k8k8pl"
   },
   "mistweaverco/kulala.nvim": {
-    "rev": "8d612b2a0f8be1afa2ec5e612def3707a7dff028",
-    "sha256": "11g6makp0ivy7abhg4cf5ba06zj4z46rqggpzl3pvxd1favjymhy"
+    "rev": "6b6e1c8b538cce6654cfc5fb3e4a3acfa316ce57",
+    "sha256": "07sgyqnlsm0zgxfg5ir3kmxbhy53h7bw14hiylvixdbp1x3xhn3h"
   },
   "aaronik/treewalker.nvim": {
-    "rev": "cfae49dedd041dbe867c2b3d0b081fc381a735e9",
-    "sha256": "0iglgg23halpidapj7d4fb391ivclac0i50yq3wzs2jyv1372xmp"
+    "rev": "ae229700e1cce34198280f588568dc49c52d9eb1",
+    "sha256": "011r3xvc6207jrzd049nfwfdiz20d7syy0l5dzqmr5f8m7kjf6dh"
   }
 }

+ 7 - 0
.config/nixpkgs/neovim/treesitter/grammars.json

@@ -82,5 +82,12 @@
     "repo": "murtaza64/tree-sitter-groovy",
     "rev": "86911590a8e46d71301c66468e5620d9faa5b6af",
     "sha256": "0vbsg5xkdja6xyp8nm7g9fs4ndaq3qz6lq8vk9c7l2znw6bb17gb"
+  },
+  "kulala_http": {
+    "repo": "mistweaverco/kulala.nvim",
+    "branch": "main",
+    "path": "lua/tree-sitter",
+    "rev": "6b6e1c8b538cce6654cfc5fb3e4a3acfa316ce57",
+    "sha256": "07sgyqnlsm0zgxfg5ir3kmxbhy53h7bw14hiylvixdbp1x3xhn3h"
   }
 }