Browse Source

nixpkgs/neovim: update to neovim 0.10.1

Thomas Dy 6 tháng trước cách đây
mục cha
commit
4b23077ab0

+ 2 - 2
.config/nixpkgs/neovim/autocmd.lua

@@ -43,8 +43,8 @@ vim.api.nvim_create_autocmd('BufWritePre', {
       -- check if can LSP format
       local clients = vim.lsp.get_active_clients({ bufnr = opts.buf })
       for _, client in ipairs(clients) do
-        if client.server_capabilities.documentFormattingProvider then
-          vim.lsp.buf.format()
+        if client.supports_method('textDocument/formatting', { bufnr = opts.buf }) then
+          vim.lsp.buf.format({ bufnr = opts.buf })
           return
         end
       end

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

@@ -5,11 +5,11 @@
         "systems": "systems"
       },
       "locked": {
-        "lastModified": 1709126324,
-        "narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=",
+        "lastModified": 1710146030,
+        "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
         "owner": "numtide",
         "repo": "flake-utils",
-        "rev": "d465f4819400de7c8d874d50b982301f28a84605",
+        "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
         "type": "github"
       },
       "original": {
@@ -20,11 +20,11 @@
     },
     "nixpkgs": {
       "locked": {
-        "lastModified": 1709780214,
-        "narHash": "sha256-p4iDKdveHMhfGAlpxmkCtfQO3WRzmlD11aIcThwPqhk=",
+        "lastModified": 1721933792,
+        "narHash": "sha256-zYVwABlQnxpbaHMfX6Wt9jhyQstFYwN2XjleOJV3VVg=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "f945939fd679284d736112d3d5410eb867f3b31c",
+        "rev": "2122a9b35b35719ad9a395fe783eabb092df01b1",
         "type": "github"
       },
       "original": {

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

@@ -18,7 +18,6 @@
       in
       {
         packages.neovim = pkgs.callPackage ./neovim.nix {};
-        packages.neovim-with-playground = pkgs.callPackage ./neovim.nix { withPlayground = true; };
         packages.neovim-with-luadev = pkgs.callPackage ./neovim.nix { withLuadev = true; };
         packages.neovim-minimal = (pkgs.callPackage ./neovim.nix {}).minimal;
         packages.default = self.packages.${system}.neovim;

+ 0 - 13
.config/nixpkgs/neovim/lsp.lua

@@ -23,19 +23,6 @@ if vim.fn.executable("node_modules/.bin/eslint") == 1 then
     settings = {
       options = options,
     },
-    handlers = {
-      ["client/registerCapability"] = function(err, result, ctx, config)
-        -- ignore as we can't handle any of this and it just spams the logs
-        return vim.NIL
-      end
-    },
-    on_init = function(client)
-      -- add formatting capability, the language server registers this
-      -- dynamically but neovim does not support that yet
-      -- https://github.com/microsoft/vscode-eslint/pull/1307
-      client.server_capabilities.documentFormattingProvider = true
-      client.server_capabilities.documentRangeFormattingProvider = true
-    end,
   })
 end
 

+ 1 - 1
.config/nixpkgs/neovim/mappings.lua

@@ -61,7 +61,7 @@ vim.keymap.set('n', '<Leader>gd', '<cmd>Gitsigns toggle_deleted<CR>', opts)
 vim.keymap.set('n', '<Leader>ut', '<cmd>UndotreeToggle<CR>', opts)
 
 -- opening terminals
-vim.keymap.set('n', '<Leader>tv', '<cmd>vsp term://$SHELL<CR>', opts)
+vim.keymap.set('n', '<Leader>tv', '<cmd>vertical term $SHELL<CR>', opts)
 vim.keymap.set('n', '<Leader>to', '<cmd>term $SHELL<CR>', opts)
 
 -- delete buffer

+ 0 - 5
.config/nixpkgs/neovim/neovim.nix

@@ -12,7 +12,6 @@
 , node-lsp
 , fetchFromGitHub
 , fetchpatch
-, withPlayground ? false
 , withLuadev ? false
 }:
 let
@@ -72,8 +71,6 @@ let
     ++ (lib.attrValues treesitterPlugins)
     ++ [
       extra-treesitter-textobjects
-    ] ++ lib.optionals withPlayground [
-      pinnedPlugins."nvim-treesitter/playground"
     ] ++ lib.optionals withLuadev [
       pinnedPlugins."bfredl/nvim-luadev"
     ];
@@ -144,8 +141,6 @@ generic {
     source ${./lsp.lua}
     source ${./make.lua}
     source ${./theme.lua}
-  '' + lib.optionalString withPlayground ''
-    source ${./playground.lua}
   '' + lib.optionalString withLuadev ''
     source ${./luadev.lua}
   '';

+ 0 - 25
.config/nixpkgs/neovim/playground.lua

@@ -1,25 +0,0 @@
-require "nvim-treesitter.configs".setup({
-  playground = {
-    enable = true,
-    disable = {},
-    updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code
-    persist_queries = false, -- Whether the query persists across vim sessions
-    keybindings = {
-      toggle_query_editor = 'o',
-      toggle_hl_groups = 'i',
-      toggle_injected_languages = 't',
-      toggle_anonymous_nodes = 'a',
-      toggle_language_display = 'I',
-      focus_language = 'f',
-      unfocus_language = 'F',
-      update = 'R',
-      goto_node = '<cr>',
-      show_help = '?',
-    },
-  },
-  query_linter = {
-    enable = true,
-    use_virtual_text = true,
-    lint_events = {"BufWrite", "CursorHold"},
-  },
-})

+ 31 - 35
.config/nixpkgs/neovim/plugins/sources.json

@@ -4,8 +4,8 @@
     "sha256": "0l8mw3r6lb6q1p3afvf5psp6cg8vdi84b5j8whmdm83f4mynsn8a"
   },
   "tpope/vim-fugitive": {
-    "rev": "41beedabc7e948c787ea5696e04c3544c3674e23",
-    "sha256": "17vwycm78bxk7y2s931lz3plzsfx39mkbgc4dnhbp9np16ywb0hc"
+    "rev": "0444df68cd1cdabc7453d6bd84099458327e5513",
+    "sha256": "0sx67lwz1f6kd2751qbbzpgq0hjik1g8x4svp788yvzbjdgdmc9l"
   },
   "tpope/vim-rhubarb": {
     "rev": "ee69335de176d9325267b0fd2597a22901d927b1",
@@ -16,64 +16,65 @@
     "sha256": "1yvpk0cnsx1b1q2wp52fv4mj71w8ssz4dcbbdix65m8qna6d0m9h"
   },
   "mbbill/undotree": {
-    "rev": "9dbbf3b7d19dda0d22ceca461818e4739ad8154d",
-    "sha256": "1avs5cmwcnp5pnyk2d6krsmgqlbd5zf32nwwcxk5ac1mhyx9fcln"
+    "rev": "56c684a805fe948936cda0d1b19505b84ad7e065",
+    "sha256": "1yy7y344b906z04rrnvy2hkrgsrxjm6ij399qmfw8b20rxdyi2jh"
   },
   "Wansmer/treesj": {
-    "rev": "60e27280030f9cd8dfb6ceb335922c6ff76682cc",
-    "sha256": "1rrcnldpl9d4fifk48w6sgrar0zhi6pbd6iqildzp3bmhf83smd1"
+    "rev": "275f83c81a5a1f5ae23c1eac30c4ac28beebbca2",
+    "sha256": "0wjhhzs65myl3hrwi12v4vqgjcqdmkh5cczpx164vcxkqa0zz06p"
   },
   "nvim-telescope/telescope.nvim": {
-    "rev": "dc1ea28cc2a02cd1cebb9d80e967807d668f78f8",
-    "sha256": "0z8rxicfksbzvdc4dwkaw44r939h5w8jqgl5wxm7f8m97c18mszq"
+    "rev": "10b8a82b042caf50b78e619d92caf0910211973d",
+    "sha256": "0i6znzbcv5m87nakhqdqn5cfkghdhbfww5avd0x8m25a2lkgl77g"
   },
   "nvim-telescope/telescope-fzf-native.nvim": {
-    "rev": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27",
-    "sha256": "0lvykmaarl5nd3iaphp8jgnxg6cly5p6ignd3i1450rpbdp1w9xg"
+    "rev": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b",
+    "sha256": "0h741m7rcm5kl0mq9kkzw6za2h53chavpkai1qp433plaxzlyj0q"
   },
   "nvim-lua/plenary.nvim": {
-    "rev": "f7adfc4b3f4f91aab6caebf42b3682945fbc35be",
-    "sha256": "0brfbf9ygzb050p4kmk5mx17y8p5zvz2wa1zyw430cdrlqb68nzy"
+    "rev": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683",
+    "sha256": "0n2p8krzwiw682f0yb6n8faamffpp336rjy50pbqf3jmc6czd5z4"
   },
   "echasnovski/mini.nvim": {
-    "rev": "70d8a16399ca6df759d20bea302d6dfd710a1df8",
-    "sha256": "1yz4jzshhkixxsxhxancpbv3b7scg5z2qlbsrl6yw695gnznpsp5"
+    "rev": "657ef75b52a548090fb7906735517b7ddbf39e88",
+    "sha256": "11y3ga65pgn90fplx7nbyyp007s15ihpzknvla3sbbk96p2b0mq7"
   },
   "lewis6991/gitsigns.nvim": {
-    "rev": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae",
-    "sha256": "0j9q39pks1lvp9zd97lc1frb2fq0irjizza34kp381gg6smxmc28"
+    "rev": "f074844b60f9e151970fbcdbeb8a2cd52b6ef25a",
+    "sha256": "07q5mh82p9y6h047xifj0fpan6ny6cb56y4ghymrvq1ziahi0xcw"
   },
   "neovim/nvim-lspconfig": {
-    "rev": "e172dd599cff2ae5267871b5e33fb42934c4df43",
-    "sha256": "07dpx30pd53sc73yiqp018f6lcw993zpgdn8726jsn9aa4gz29r0"
+    "rev": "9c762dcd457d2ab99edb3f3433cea9865ded47ad",
+    "sha256": "0ydb8phh5iyd4k6nawlsy63cmm2pmgz41fxdsgk9259p15iv05ij"
   },
   "nvim-treesitter/nvim-treesitter-textobjects": {
-    "rev": "b7a0bfa3e93697ca5b61b15df633404bf8f45883",
-    "sha256": "0155mq7m6ynk394jfnzhv5hiwspckhlc0xlvfhhy1kzmyzamv4ll"
+    "rev": "34867c69838078df7d6919b130c0541c0b400c47",
+    "sha256": "0c8f2y8glhsbd2nbb0iwjly8f07mjy55z3j53l0p360dgj23kmpw"
   },
   "jose-elias-alvarez/typescript.nvim": {
     "rev": "4de85ef699d7e6010528dcfbddc2ed4c2c421467",
     "sha256": "0rx29i3hmzh2knxx098fvfc0iafx3j08bs1zbv4dxadq56dnhaxm"
   },
   "sainnhe/sonokai": {
-    "rev": "a62656a798043f3c6b603efa98d4de2da89c72b2",
-    "sha256": "09l69n5j80pdb5awja3mzlsw5i7f1w1jp1xwfq72wrcap96xyk3g"
+    "rev": "598d29bef1cdea1eef4749c96824af0ae2f9350c",
+    "sha256": "12q9zi5vn5mvs4kl8r6wfsk4l66f7lmk9yx0acyvszl3isgyq085"
   },
   "LnL7/vim-nix": {
     "rev": "e25cd0f2e5922f1f4d3cd969f92e35a9a327ffb0",
     "sha256": "15k08hl1xls2zxa9sgsjygb6j8643pc0s0fpi05bfldf9z4mxzyv"
   },
   "rest-nvim/rest.nvim": {
-    "rev": "b1c84475a8f053037cecf5249e6b69af5a7548d6",
-    "sha256": "08h28fylnyqp1w0c1scvv6631pwynhirwfsyrjwsz2qfpp145j8i"
+    "branch": "v1.2.1",
+    "rev": "1ce984c694345f3801bc656072f9a8dd51286a04",
+    "sha256": "07q3kss0f6ggil2h4jcfxkwy0gm3q7bl3p4ysy725vnnmhhhlzkx"
   },
   "hrsh7th/cmp-nvim-lsp": {
-    "rev": "5af77f54de1b16c34b23cba810150689a3a90312",
-    "sha256": "03q0v6wgi1lphcfjjdsc26zhnmj3ab9xxsiyp1adl3s1ybv22jzz"
+    "rev": "39e2eda76828d88b773cc27a3f61d2ad782c922d",
+    "sha256": "13zcw6c7zppvbsjlr8yj3vml6ayalvhjbbqszljmn1f9hmkpwg89"
   },
   "hrsh7th/nvim-cmp": {
-    "rev": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782",
-    "sha256": "0zzlkla5vgrfa55a3sjb885q0574s67ji5ps2rq53q82hlfwwphl"
+    "rev": "d818fd0624205b34e14888358037fb6f5dc51234",
+    "sha256": "18yjwihrr4ykq2h8yv67550358bmxi6maqvrhhbvxf402r01zkld"
   },
   "hrsh7th/cmp-vsnip": {
     "rev": "989a8a73c44e926199bfd05fa7a516d51f2d2752",
@@ -84,13 +85,8 @@
     "sha256": "06j0fph91x3gdhbf9bb0yv95j34gf827p97vak0l4jb0ib7vmyc2"
   },
   "nvim-treesitter/nvim-treesitter": {
-    "rev": "9775d5d7c724f81acdd441e7e9edefc4514e990b",
-    "sha256": "1y402652wx65pypqzdqhil1ib488pvkdpzm0ivxv99fp5fg34lqi"
-  },
-  "nvim-treesitter/playground": {
-    "optional": true,
-    "rev": "ba48c6a62a280eefb7c85725b0915e021a1a0749",
-    "sha256": "1vgj5vc32ly15ni62fk51yd8km2zp3fkzx0622x5cv9pavmjpr40"
+    "rev": "63be47f203d3e9174fdac3872fb9766e5bcc5a11",
+    "sha256": "0sfcmci0braphr96l5p5l4r5ripj4nslynrjs1bmzxv8c1lkcq39"
   },
   "bfredl/nvim-luadev": {
     "optional": true,

+ 2 - 2
.config/nixpkgs/neovim/settings.lua

@@ -44,8 +44,8 @@ vim.o.modeline = false
 -- show preview of lines when using :s
 vim.o.inccommand = 'split'
 
--- disable mouse support
-vim.o.mouse = false
+-- mouse only in visual mode
+vim.o.mouse = 'v'
 
 -- set foldexpr to use treesitter
 vim.o.foldmethod = 'expr'

+ 35 - 30
.config/nixpkgs/neovim/treesitter/grammars.json

@@ -1,11 +1,11 @@
 {
   "bash": {
-    "rev": "975bc70ad95dbbf2733872bc2e0a059c055db983",
-    "sha256": "1889z1nvifnk1sq18w3zr7f7jmz1fn2bs6c5xrfh6s1m5w3p0kj9"
+    "rev": "2fbd860f802802ca76a6661ce025b3a3bca2d3ed",
+    "sha256": "1diy2v5csp7v6bincvba1p8gwlly6izk9pla54b78fh0fip90axc"
   },
   "css": {
-    "rev": "02b4ee757654b7d54fe35352fd8e53a8a4385d42",
-    "sha256": "0j1kg16sly7xsvvc3kxyy5zaznlbz7x2j2bwwv1r1nki2249ly12"
+    "rev": "f6be52c3d1cdb1c5e4dd7d8bce0a57497f55d6af",
+    "sha256": "1mq5yzcj16bv9jphgj0v16fsa9bzf7y204c78mf79ls2rqsanljp"
   },
   "elvish": {
     "repo": "elves/tree-sitter-elvish",
@@ -14,63 +14,68 @@
   },
   "http": {
     "repo": "rest-nvim/tree-sitter-http",
-    "rev": "6824a247d1326079aab4fa9f9164e9319678081d",
-    "sha256": "0vhipdljx3s2pgzdk2a1zgqf8dd7p3bdbjckcb6z01hdg2p9v121"
+    "rev": "e061995f0caf2fa30f68fa1fdf2c08bcbd4629a8",
+    "sha256": "0aicy74pbznfbrvwljidjna6x9h39lb01xb5p5kf1p35pqxwh0yg"
   },
   "go": {
-    "rev": "fd577c4358c28cbcb6748bbf65354cc85f1cf7a4",
-    "sha256": "1gwzg90z8m80klqp0n6kn93b46mi8f2k5n3n05bv6bf9515p2gqp"
+    "rev": "7ee8d928db5202f6831a78f8112fd693bf69f98b",
+    "sha256": "19z2819gfhynp8c5rbcvy75ah5w14d4bs2a3pply1jwpqiyfj5q1"
   },
   "javascript": {
-    "rev": "51aed7263d33bee46b0a8a5e165ffcb690d5aca8",
-    "sha256": "11ld21d4qdr4jbnz96y2hsc2dmcsbpsmz6h59v7fk0agib0xaf8l"
+    "rev": "12e45374422f6051648717be62f0ffc40a279ee2",
+    "sha256": "0p4vwy1rz362i8p6avyxaipg0yxhhxfj0p2cdq2q6gw8jcb0j498"
   },
   "json": {
-    "rev": "3b129203f4b72d532f58e72c5310c0a7db3b8e6d",
-    "sha256": "0rnfhmhr76fjlc6zzbxzrxrxa1xxpkg1jgq7vdw4630l1cg2nlbm"
+    "rev": "94f5c527b2965465956c2000ed6134dd24daf2a7",
+    "sha256": "14za39wy4cw0r6r2m5a1i1za9m2wcyrlmh6yi2zl15b86i3dkbyp"
   },
   "lua": {
     "repo": "MunifTanjim/tree-sitter-lua",
-    "rev": "04c9579dcb917255b2e5f8199df4ae7f587d472f",
-    "sha256": "18v9g8ncc635xn0ms33v90r04xvagr2x3zrbf9yg7z3qf7lsfg4k"
+    "rev": "a24dab177e58c9c6832f96b9a73102a0cfbced4a",
+    "sha256": "1184dazb4agqf3v55sz8i7xmynsn4rkddhbph3mgmh5qsnk88mmq"
   },
   "markdown": {
     "repo": "MDeiml/tree-sitter-markdown",
     "path": "tree-sitter-markdown",
-    "rev": "2821521a4e6eab37b63dff6a8e169cd88554047d",
-    "sha256": "07nhfyca7jb2mwbfygrcfc4ba2zrmkf1bk54q8q5l78cl847z1i6"
+    "rev": "7fe453beacecf02c86f7736439f238f5bb8b5c9b",
+    "sha256": "1virik97kq9s1ykhwqx3b0ylvjkp1madv1j1gila6dvdypjk0bq2"
   },
   "nix": {
     "repo": "nix-community/tree-sitter-nix",
-    "rev": "763168fa916a333a459434f1424b5d30645f015d",
-    "sha256": "0nn3ij8k6wkbf3kcvkyyp0vhfjcksi31wyyfwmsbx66maf2xgaii"
+    "rev": "0fdada10f1f845ca9116e279ad8f5d0ca93e9949",
+    "sha256": "1vnf28sgzck9i020is5m5ff95b6sxp2kams21nwrajvq66a38xl6"
   },
   "ruby": {
-    "rev": "22a0bb2678755a3714e194609862ea7f4516e807",
-    "sha256": "073cxgwq246w93y8ylcag9lbmpsx4iqbj9r9ja42l3qrni2yjgcl"
+    "rev": "0ffe457fb6aabf064f173fd30ea356845cef2513",
+    "sha256": "0yzbj03b318xscyp9rgnhd6c4gas5n6l77qccwb972hsx7xri3hk"
   },
   "tsx": {
     "repo": "tree-sitter/tree-sitter-typescript",
     "path": "tsx",
-    "rev": "198e2ea43d1c4ddd76ee883f4eae15f4201cd241",
-    "sha256": "0gsip20fb39miq680b23al3skk6kaxqyds9g31h1d6vjr2i6lxas"
+    "rev": "198d03553f43a45b92ac5d0ee167db3fec6a6fd6",
+    "sha256": "1dff1in14va80mx1hydz46llcn396r8xhisgkmw4fsi0izx7p7sk"
   },
   "typescript": {
     "path": "typescript",
-    "rev": "198e2ea43d1c4ddd76ee883f4eae15f4201cd241",
-    "sha256": "0gsip20fb39miq680b23al3skk6kaxqyds9g31h1d6vjr2i6lxas"
+    "rev": "198d03553f43a45b92ac5d0ee167db3fec6a6fd6",
+    "sha256": "1dff1in14va80mx1hydz46llcn396r8xhisgkmw4fsi0izx7p7sk"
   },
   "jsdoc": {
-    "rev": "6a6cf9e7341af32d8e2b2e24a37fbfebefc3dc55",
-    "sha256": "1xmkkqyb9mc18jh6dlffzw9j560mmc5i6fbic8ki9z0r30b1ravw"
+    "rev": "49fde205b59a1d9792efc21ee0b6d50bbd35ff14",
+    "sha256": "030r6ksv6v0wnlb8yi22n0blls21cipzvgi4flnjllpm9vrsxxii"
   },
   "vimdoc": {
     "repo": "neovim/tree-sitter-vimdoc",
-    "rev": "016ad75faa854e4e13bc40c517015183b795eed9",
-    "sha256": "1gia88qfyzfxaypv75vcqs2p3k1mn4kq0a3zqj52sw58zqim5s5z"
+    "rev": "2249c44ecd3f5cf22da3dcccfb74f816ddb29245",
+    "sha256": "0raqlzi2x9a0qrfidgw0gqda8030jz518kdwzvyxjndnd5cd5rdz"
   },
   "java": {
-    "rev": "99b29f1ed957b3b424b6e21f57bd21a9732a622a",
-    "sha256": "1i776ikfdg70fnsg5sih3bf3pxgjyqwyhd122b3cxp4dxxfds3fq"
+    "rev": "953abfc8bb3eb2f578e1f461edba4a9885f974b8",
+    "sha256": "0f0mi8s0sm9l3hkz23rcfgmdww9lfadj2qmyg44s68skqwzc9sh8"
+  },
+  "query": {
+    "repo": "tree-sitter-grammars/tree-sitter-query",
+    "rev": "f767fb0ac5e711b6d44c5e0c8d1f349687a86ce0",
+    "sha256": "0wi01kmvb5axavfm6jp3rd6dd9pnq551w9lgwcgs02amxp6z8ymj"
   }
 }