Skip to content

Commit f054141

Browse files
authored
[migration] set nvim-treesitter to main branch, close #1541 (#1544)
* feat!(plugins.editor): set `nvim-treesitter` and `nvim-treesitter-textobjects` branch to `main` * fix(lockfile): manually remove lockfile to make branch-changing effective * feat!(configs.editor): migrate `treesitter` and `ts-textobjects` config * feat!(keymap.editor): move `ts-textobjects`' keymap here --------- Signed-off-by: Charles Chiu <[email protected]>
1 parent 7361ba1 commit f054141

File tree

5 files changed

+150
-89
lines changed

5 files changed

+150
-89
lines changed

lazy-lock.json

Lines changed: 24 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,92 @@
11
{
22
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
3-
"LuaSnip": { "branch": "master", "commit": "3732756842a2f7e0e76a7b0487e9692072857277" },
3+
"LuaSnip": { "branch": "master", "commit": "5a1e39223db9a0498024a77b8441169d260c8c25" },
44
"advanced-git-search.nvim": { "branch": "main", "commit": "e6d0fa39c7b058b4f3019912c3e26f854c4e36af" },
55
"alpha-nvim": { "branch": "main", "commit": "3979b01cb05734331c7873049001d3f2bb8477f4" },
6-
"autoclose.nvim": { "branch": "main", "commit": "3f86702b54a861a17d7994b2e32a7c648cb12fb1" },
6+
"blink-ripgrep.nvim": { "branch": "main", "commit": "8b6642def8fa43bb64fc333a4b745f83db20778b" },
7+
"blink.cmp": { "branch": "main", "commit": "b19413d214068f316c78978b08264ed1c41830ec" },
78
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
9+
"bullets.vim": { "branch": "master", "commit": "1c13e510e11d08b0259e8e627f128359c5521962" },
810
"catppuccin": { "branch": "refactor/syntax-highlighting", "commit": "6056f37ecc13403fa42b4f550bd9b1c900a1c433" },
9-
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
10-
"cmp-latex-symbols": { "branch": "main", "commit": "86b68e6d6c550442d4a3f826e1b8358c5300824c" },
11-
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
12-
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
13-
"cmp-spell": { "branch": "master", "commit": "694a4e50809d6d645c1ea29015dad0c293f019d6" },
14-
"cmp-tmux": { "branch": "main", "commit": "95b1b921802e6f60627b3e76afb9380fddd87f9a" },
15-
"cmp-under-comparator": { "branch": "master", "commit": "6857f10272c3cfe930cece2afa2406e1385bfef8" },
16-
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
17-
"codecompanion-history.nvim": { "branch": "main", "commit": "eb99d256352144cf3b6a1c45608ec25544a0813d" },
18-
"codecompanion.nvim": { "branch": "main", "commit": "e7762c68daf24c3e356401f5223eeb5217047754" },
19-
"copilot-cmp": { "branch": "master", "commit": "15fc12af3d0109fa76b60b5cffa1373697e261d1" },
20-
"copilot.lua": { "branch": "master", "commit": "4383e05a47493d7ff77b058c0548129eb38ec7fb" },
21-
"crates.nvim": { "branch": "main", "commit": "ac9fa498a9edb96dc3056724ff69d5f40b898453" },
22-
"csv.vim": { "branch": "master", "commit": "78be83fec47de100abfe7cc1c4c26768fc892d7e" },
11+
"colorful-menu.nvim": { "branch": "master", "commit": "b51a659459df8d078201aefc995db8175ed55e84" },
12+
"dial.nvim": { "branch": "master", "commit": "f97c0c7fa7d5111bc04a91d0f693900fb2d95861" },
2313
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
2414
"dropbar.nvim": { "branch": "master", "commit": "ce202248134e3949aac375fd66c28e5207785b10" },
2515
"edgy.nvim": { "branch": "main", "commit": "8bfd2808994a988c975694122f68624b8a219f5f" },
2616
"faster.nvim": { "branch": "main", "commit": "2e7a50f659711854b9a7fdc76d943b59b30d7852" },
2717
"flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
2818
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
29-
"fzf": { "branch": "master", "commit": "cfc37caabcf97f43595b5a06d60d6c7d36ba43e9" },
30-
"fzy-lua-native": { "branch": "master", "commit": "9d720745d5c2fb563c0d86c17d77612a3519c506" },
19+
"fzf": { "branch": "master", "commit": "af2a81dc02c41c6b36b2324bc1c7453a7722d0d7" },
20+
"fzf-lua": { "branch": "main", "commit": "9a0704e8af8f8442110ff22a83b5608366b235df" },
3121
"gitsigns.nvim": { "branch": "main", "commit": "5813e4878748805f1518cee7abb50fd7205a3a48" },
3222
"glance.nvim": { "branch": "master", "commit": "bf86d8b79dce808e65fdb6e9269d0b4ed6d2eefc" },
3323
"go.nvim": { "branch": "master", "commit": "81bb94c1d21648245eb14c69461f5c7f8c705752" },
3424
"grug-far.nvim": { "branch": "main", "commit": "b58b2d65863f4ebad88b10a1ddd519e5380466e0" },
3525
"guihua.lua": { "branch": "master", "commit": "ef44ba40f12e56c1c9fa45967f2b4d142e4b97a0" },
36-
"hop.nvim": { "branch": "master", "commit": "08ddca799089ab96a6d1763db0b8adc5320bf050" },
3726
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
3827
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
28+
"lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
3929
"lsp-format-modifications.nvim": { "branch": "main", "commit": "fd2b0de0afa42bea1d310af8337a4a95ebd27260" },
40-
"lsp_signature.nvim": { "branch": "master", "commit": "04c0a136299c96c40881015853c58dd1e98e1c56" },
4130
"lspsaga.nvim": { "branch": "main", "commit": "8efe00d6aed9db6449969f889170f1a7e43101a1" },
4231
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
32+
"luvit-meta": { "branch": "main", "commit": "0ea4ff636c5bb559ffa78108561d0976f4de9682" },
4333
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
4434
"mason-lspconfig.nvim": { "branch": "main", "commit": "7d527c76c43f46294de9c19d39c5a86317809b4b" },
4535
"mason-null-ls.nvim": { "branch": "main", "commit": "8e7806acaa87fae64f0bfde25bb4b87c18bd19b4" },
4636
"mason-nvim-dap.nvim": { "branch": "main", "commit": "9a10e096703966335bd5c46c8c875d5b0690dade" },
4737
"mason.nvim": { "branch": "main", "commit": "57e5a8addb8c71fb063ee4acda466c7cf6ad2800" },
38+
"mini.ai": { "branch": "main", "commit": "e139eb1101beb0250fea322f8c07a42f0f175688" },
4839
"mini.align": { "branch": "main", "commit": "60c61c8c63dca41b5ac6bfc36b52df69b1a03e6b" },
4940
"mini.cursorword": { "branch": "main", "commit": "dda0f57d55bb1fa19423b7201b2ba892c7d2bb3c" },
50-
"neoconf.nvim": { "branch": "main", "commit": "75386e7bf2888a7b133d8a78d11e029d05cb070d" },
41+
"mini.surround": { "branch": "main", "commit": "88c52297ed3e69ecf9f8652837888ecc727a28ee" },
42+
"neogen": { "branch": "main", "commit": "d7f9461727751fb07f82011051338a9aba07581d" },
5143
"neoscroll.nvim": { "branch": "master", "commit": "f957373912e88579e26fdaea4735450ff2ef5c9c" },
5244
"none-ls.nvim": { "branch": "main", "commit": "1917c86818b5e058f53c2ea0ad38fc57534d62fc" },
5345
"nvim-bqf": { "branch": "main", "commit": "ba2b365969d7c2c6301d48e13aeee59568765529" },
5446
"nvim-bufdel": { "branch": "main", "commit": "523d58e94e7212fff3e05c247b962dc8f93bcfde" },
55-
"nvim-cmp": { "branch": "main", "commit": "d97d85e01339f01b842e6ec1502f639b080cb0fc" },
5647
"nvim-dap": { "branch": "master", "commit": "5860c7c501eb428d3137ee22c522828d20cca0b3" },
5748
"nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
5849
"nvim-highlight-colors": { "branch": "main", "commit": "e0c4a58ec8c3ca7c92d3ee4eb3bc1dd0f7be317e" },
59-
"nvim-lspconfig": { "branch": "master", "commit": "effe4bf2e1afb881ea67291c648b68dd3dfc927a" },
50+
"nvim-lspconfig": { "branch": "master", "commit": "07f4e93de92e8d4ea7ab99602e3a8c9ac0fb778a" },
6051
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
6152
"nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" },
6253
"nvim-scrollview": { "branch": "main", "commit": "316c37c96e6ab7d15e18f878366d0497179e8891" },
63-
"nvim-tree.lua": { "branch": "master", "commit": "776a5cdfac948b490e06f1d1d22c4cb986e40699" },
64-
"nvim-treehopper": { "branch": "master", "commit": "e3861c0231631c6af317d6746bb78fdb428a58f3" },
65-
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
54+
"nvim-treesitter": { "branch": "main", "commit": "17885756e63df73ed90db62e4630f744ceda6514" },
6655
"nvim-treesitter-context": { "branch": "master", "commit": "660861b1849256398f70450afdf93908d28dc945" },
67-
"nvim-treesitter-textobjects": { "branch": "master", "commit": "5ca4aaa6efdcc59be46b95a3e876300cfead05ef" },
56+
"nvim-treesitter-textobjects": { "branch": "main", "commit": "63c4dce4a56312ef1bdeafd16bdefa008fcc950a" },
6857
"nvim-ts-autotag": { "branch": "main", "commit": "c4ca798ab95b316a768d51eaaaee48f64a4a46bc" },
6958
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" },
7059
"nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" },
7160
"paint.nvim": { "branch": "main", "commit": "07ffa7e0e41f8d5b4ee7aa1531a33812db7595ac" },
7261
"persisted.nvim": { "branch": "main", "commit": "5063ee8e3589a43eefadcca57496aea01b6170fa" },
7362
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
74-
"project.nvim": { "branch": "main", "commit": "538bcaa1f1115e424ac983ea5d5b865d35466baf" },
63+
"project.nvim": { "branch": "main", "commit": "7d69648dfad76269670bb3a058d59b47774db308" },
64+
"python-copy-reference.vim": { "branch": "main", "commit": "8172d0ce83d730820d9497fd2e988046022d0b99" },
7565
"rainbow-delimiters.nvim": { "branch": "master", "commit": "8aafe2cbd89cd4090f573a98cab6b20366576fde" },
7666
"render-markdown.nvim": { "branch": "main", "commit": "6e0e8902dac70fecbdd8ce557d142062a621ec38" },
77-
"rustaceanvim": { "branch": "master", "commit": "6c3785d6a230bec63f70c98bf8e2842bed924245" },
67+
"schemastore.nvim": { "branch": "main", "commit": "5f2299987a1937612c910f00db39156bab6a6b35" },
7868
"search.nvim": { "branch": "main", "commit": "d403c320fbb1d07008cb6ab73c42bdff18a7f7fb" },
7969
"smart-splits.nvim": { "branch": "master", "commit": "e892a5da963813119d053af5b2260e3cd9d9f037" },
8070
"smartyank.nvim": { "branch": "master", "commit": "c4e53e0d9316ca790a6f5d78aad73206a763873b" },
8171
"sniprun": { "branch": "master", "commit": "94ca2a7ff33f9dbe9bef093a2efb2aa12ad64aeb" },
8272
"suda.vim": { "branch": "master", "commit": "c492741b4679b3cdd4d9e34138209784e061d916" },
73+
"telescope-env.nvim": { "branch": "master", "commit": "00a703cc7b713cdda0a981d88fddf3ce25502af5" },
8374
"telescope-frecency.nvim": { "branch": "master", "commit": "fc6418bf663a182b72427487246b870f2ddbbbe2" },
8475
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
8576
"telescope-live-grep-args.nvim": { "branch": "master", "commit": "b80ec2c70ec4f32571478b501218c8979fab5201" },
8677
"telescope-undo.nvim": { "branch": "main", "commit": "928d0c2dc9606e01e2cc547196f48d2eaecf58e5" },
87-
"telescope-zoxide": { "branch": "main", "commit": "54bfe630bad08dc9891ec78c7cf8db38dd725c97" },
8878
"telescope.nvim": { "branch": "master", "commit": "e69b434b968a33815e2f02a5c7bd7b8dd4c7d4b2" },
8979
"tiny-inline-diagnostic.nvim": { "branch": "main", "commit": "38b06435305c30966b7ceb0a43e460dc43acaada" },
9080
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
9181
"toggleterm.nvim": { "branch": "main", "commit": "9a88eae817ef395952e08650b3283726786fb5fb" },
9282
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
9383
"vim-cool": { "branch": "master", "commit": "9ea940c0d537e55de0de4c0298c04b976960fb12" },
9484
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" },
85+
"vim-log-highlighting": { "branch": "master", "commit": "1037e26f3120e6a6a2c0c33b14a84336dee2a78f" },
9586
"vim-matchup": { "branch": "master", "commit": "1c276e12b49a83c1bdca74351187b8adea5da4b9" },
9687
"vim-rhubarb": { "branch": "master", "commit": "5496d7c94581c4c9ad7430357449bb57fc59f501" },
97-
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
88+
"vimtex": { "branch": "master", "commit": "32bcb3922c20588e00de68f73c86312eda2141ad" },
89+
"wezterm-types": { "branch": "main", "commit": "bba4eacfdce545a9d5c29c69d20bbb9c90189224" },
9890
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" },
99-
"wilder.nvim": { "branch": "master", "commit": "679f348dc90d80ff9ba0e7c470c40a4d038dcecf" }
91+
"yazi.nvim": { "branch": "main", "commit": "d666962582840f889161109cf970d311c7a447d0" }
10092
}

lua/keymap/editor.lua

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ local map_cmd = bind.map_cmd
55
local map_callback = bind.map_callback
66
local et = bind.escape_termcode
77

8+
local ts_to_select = require("nvim-treesitter-textobjects.select")
9+
local ts_to_swap = require("nvim-treesitter-textobjects.swap")
10+
local ts_to_move = require("nvim-treesitter-textobjects.move")
11+
local ts_to_repeat_move = require("nvim-treesitter-textobjects.repeatable_move")
12+
813
local mappings = {
914
builtins = {
1015
-- Builtins: Save & Quit
@@ -133,6 +138,102 @@ local mappings = {
133138

134139
-- Plugin: suda.vim
135140
["n|<A-s>"] = map_cu("SudaWrite"):with_silent():with_noremap():with_desc("editn: Save file using sudo"),
141+
142+
-- Plugin: nvim-treesitter-textobjects
143+
-- Text objects: select
144+
["xo|af"] = map_callback(function()
145+
ts_to_select.select_textobject("@function.outer", "textobjects")
146+
end)
147+
:with_silent()
148+
:with_noremap()
149+
:with_desc("editxo: Select function.outer"),
150+
["xo|if"] = map_callback(function()
151+
ts_to_select.select_textobject("@function.inner", "textobjects")
152+
end)
153+
:with_silent()
154+
:with_noremap()
155+
:with_desc("editxo: Select function.inner"),
156+
["xo|ac"] = map_callback(function()
157+
ts_to_select.select_textobject("@class.outer", "textobjects")
158+
end)
159+
:with_silent()
160+
:with_noremap()
161+
:with_desc("editxo: Select class.outer"),
162+
["xo|ic"] = map_callback(function()
163+
ts_to_select.select_textobject("@class.inner", "textobjects")
164+
end)
165+
:with_silent()
166+
:with_noremap()
167+
:with_desc("editoxo: Select class.inner"),
168+
-- Text objects: swap
169+
["n|<leader>a"] = map_callback(function()
170+
ts_to_swap.swap_next("@parameter.inner")
171+
end)
172+
:with_silent()
173+
:with_noremap()
174+
:with_desc("editn: Swap parameter.inner"),
175+
["n|<leader>A"] = map_callback(function()
176+
ts_to_swap.swap_next("@parameter.outer")
177+
end)
178+
:with_silent()
179+
:with_noremap()
180+
:with_desc("editn: Swap parameter.outer"),
181+
-- Text objects: move
182+
["nxo|]["] = map_callback(function()
183+
ts_to_move.goto_next_start("@function.outer", "textobjects")
184+
end)
185+
:with_silent()
186+
:with_noremap()
187+
:with_desc("editnxo: Move to next function.outer start"),
188+
["nxo|]m"] = map_callback(function()
189+
ts_to_move.goto_next_start("@class.outer", "textobjects")
190+
end)
191+
:with_silent()
192+
:with_noremap()
193+
:with_desc("editnxo: Move to next class.outer start"),
194+
["nxo|]]"] = map_callback(function()
195+
ts_to_move.goto_next_end("@function.outer", "textobjects")
196+
end)
197+
:with_silent()
198+
:with_noremap()
199+
:with_desc("editnxo: Move to next function.outer end"),
200+
["nxo|]M"] = map_callback(function()
201+
ts_to_move.goto_next_end("@class.outer", "textobjects")
202+
end)
203+
:with_silent()
204+
:with_noremap()
205+
:with_desc("editnxo: Move to next class.outer end"),
206+
["nxo|[["] = map_callback(function()
207+
ts_to_move.goto_previous_start("@function.outer", "textobjects")
208+
end)
209+
:with_silent()
210+
:with_noremap()
211+
:with_desc("editnxo: Move to previous function.outer start"),
212+
["nxo|[m"] = map_callback(function()
213+
ts_to_move.goto_previous_start("@class.outer", "textobjects")
214+
end)
215+
:with_silent()
216+
:with_noremap()
217+
:with_desc("editnxo: Move to previous class.outer start"),
218+
["nxo|[]"] = map_callback(function()
219+
ts_to_move.goto_previous_end("@function.outer", "textobjects")
220+
end)
221+
:with_silent()
222+
:with_noremap()
223+
:with_desc("editnxo: Move to previous function.outer end"),
224+
["nxo|[M"] = map_callback(function()
225+
ts_to_move.goto_previous_end("@class.outer", "textobjects")
226+
end)
227+
:with_silent()
228+
:with_noremap()
229+
:with_desc("editnxo: Move to previous class.outer end"),
230+
-- movements repeat
231+
["nxo|;"] = map_callback(function()
232+
ts_to_repeat_move.repeat_last_move_next()
233+
end)
234+
:with_silent()
235+
:with_noremap()
236+
:with_desc("editnxo: Repeat last move"),
136237
},
137238
}
138239

Lines changed: 3 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,7 @@
11
return vim.schedule_wrap(function()
2-
local use_ssh = require("core.settings").use_ssh
2+
vim.api.nvim_set_option_value("indentexpr", "v:lua.require'nvim-treesitter'.indentexpr()", {})
33

4-
vim.api.nvim_set_option_value("foldmethod", "expr", {})
5-
vim.api.nvim_set_option_value("foldexpr", "nvim_treesitter#foldexpr()", {})
4+
require("modules.utils").load_plugin("nvim-treesitter")
65

7-
require("modules.utils").load_plugin("nvim-treesitter", {
8-
ensure_installed = require("core.settings").treesitter_deps,
9-
highlight = {
10-
enable = true,
11-
disable = function(ft)
12-
return vim.tbl_contains({ "gitcommit" }, ft)
13-
end,
14-
additional_vim_regex_highlighting = false,
15-
},
16-
textobjects = {
17-
select = {
18-
enable = true,
19-
lookahead = true,
20-
keymaps = {
21-
["af"] = "@function.outer",
22-
["if"] = "@function.inner",
23-
["ac"] = "@class.outer",
24-
["ic"] = "@class.inner",
25-
},
26-
},
27-
move = {
28-
enable = true,
29-
set_jumps = true,
30-
goto_next_start = {
31-
["]["] = "@function.outer",
32-
["]m"] = "@class.outer",
33-
},
34-
goto_next_end = {
35-
["]]"] = "@function.outer",
36-
["]M"] = "@class.outer",
37-
},
38-
goto_previous_start = {
39-
["[["] = "@function.outer",
40-
["[m"] = "@class.outer",
41-
},
42-
goto_previous_end = {
43-
["[]"] = "@function.outer",
44-
["[M"] = "@class.outer",
45-
},
46-
},
47-
},
48-
indent = { enable = true },
49-
matchup = { enable = true },
50-
}, false, require("nvim-treesitter.configs").setup)
51-
require("nvim-treesitter.install").prefer_git = true
52-
if use_ssh then
53-
local parsers = require("nvim-treesitter.parsers").get_parser_configs()
54-
for _, parser in pairs(parsers) do
55-
parser.install_info.url = parser.install_info.url:gsub("https://github.com/", "[email protected]:")
56-
end
57-
end
6+
require("nvim-treesitter").install(require("core.settings").treesitter_deps)
587
end)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
return function()
2+
require("modules.utils").load_plugin("nvim-treesitter-textobjects", {
3+
select = {
4+
lookahead = true,
5+
selection_modes = {
6+
["@parameter.outer"] = "v", -- charwise
7+
["@function.outer"] = "V", -- linewise
8+
["@class.outer"] = "<c-v>", -- blockwise
9+
},
10+
},
11+
move = {
12+
set_jumps = true,
13+
},
14+
})
15+
end

lua/modules/plugins/editor.lua

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,21 @@ editor["MagicDuck/grug-far.nvim"] = {
9393
--  :treesitter related plugins --
9494
----------------------------------------------------------------------
9595
editor["nvim-treesitter/nvim-treesitter"] = {
96-
lazy = true,
96+
lazy = false, -- nvim-ts cannot lazy load now
97+
branch = "main",
9798
build = function()
9899
if #vim.api.nvim_list_uis() > 0 then
99100
vim.api.nvim_command([[TSUpdate]])
100101
end
101102
end,
102-
event = "BufReadPre",
103103
config = require("editor.treesitter"),
104104
dependencies = {
105105
{ "mfussenegger/nvim-treehopper" },
106-
{ "nvim-treesitter/nvim-treesitter-textobjects" },
106+
{
107+
"nvim-treesitter/nvim-treesitter-textobjects",
108+
branch = "main",
109+
config = require("editor.ts-textobjects"),
110+
},
107111
{
108112
"andymass/vim-matchup",
109113
init = require("editor.matchup"),

0 commit comments

Comments
 (0)