nvim: Hook treesitter commentstrings into comment maps
This commit is contained in:
parent
72514b2a5e
commit
382bcdba72
3 changed files with 12 additions and 3 deletions
|
@ -45,7 +45,7 @@
|
|||
"nvim-treesitter": { "branch": "master", "commit": "c38646edf2bdfac157ca619697ecad9ea87fd469" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "895ec44f5c89bc67ba5440aef3d1f2efa3d59a41" },
|
||||
"nvim-treesitter-textsubjects": { "branch": "master", "commit": "b913508f503527ff540f7fe2dcf1bf1d1f259887" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "a0f89563ba36b3bacd62cf967b46beb4c2c29e52" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "729d83ecb990dc2b30272833c213cc6d49ed5214" },
|
||||
"nvim-ts-rainbow2": { "branch": "master", "commit": "b2d1f4f51b1bd20de419ffb6f5d0876c4f20d9db" },
|
||||
"otter.nvim": { "branch": "main", "commit": "8b46caf113918c26a9247031d6482709078ec907" },
|
||||
"playground": { "branch": "master", "commit": "4044b53c4d4fcd7a78eae20b8627f78ce7dc6f56" },
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
require('mini.ai').setup()
|
||||
require('mini.comment').setup()
|
||||
require('mini.comment').setup({
|
||||
hooks = {
|
||||
pre = function()
|
||||
require('ts_context_commentstring.internal').update_commentstring()
|
||||
end
|
||||
}
|
||||
})
|
||||
require('mini.cursorword').setup({ delay = 500 })
|
||||
require('mini.fuzzy').setup()
|
||||
require('mini.indentscope').setup({
|
||||
|
|
|
@ -14,5 +14,8 @@ require 'nvim-treesitter.configs'.setup {
|
|||
},
|
||||
|
||||
-- for improved commentstrings, needs corresponding plugin
|
||||
context_commentstring = {enable = true}
|
||||
context_commentstring = {
|
||||
enable = true,
|
||||
enable_autocmd = false -- since we run it as a hook from the mini.comment plugin
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue