nvim: Add endwise plugin to treesitter

Will automatically add function end tags for a bunch of languages, most importantly
for me to lua and bash.
This commit is contained in:
Marty Oehme 2023-12-12 12:04:53 +01:00
parent ea7b2e632e
commit 1e47459801
Signed by: Marty
GPG Key ID: EDBF2ED917B2EF6A
2 changed files with 10 additions and 5 deletions

View File

@ -60,6 +60,7 @@
"nvim-tree.lua": { "branch": "master", "commit": "7d1760f892951dd6a118dae1d7a1d8df5f029edf" },
"nvim-treesitter": { "branch": "master", "commit": "63260da18bf273c76b8e2ea0db84eb901cab49ce" },
"nvim-treesitter-context": { "branch": "master", "commit": "bf4d15ee4e96ff5201f16a4ed14443670662eb90" },
"nvim-treesitter-endwise": { "branch": "master", "commit": "4c344ffc8d54d7e1ba2cefaaa2c10ea93aa1cc2d" },
"nvim-treesitter-textsubjects": { "branch": "master", "commit": "011c09784f1a95cf469a48c1993b664190440391" },
"nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1277b4a1f451b0f18c0790e1a7f12e1e5fdebfee" },

View File

@ -13,9 +13,9 @@ return {
language_tree = true,
disable = function(_, bufnr)
if
vim.api.nvim_buf_line_count(bufnr) > 1000
vim.api.nvim_buf_line_count(bufnr) > 1000
or vim.fn.strwidth(vim.fn.getline(".")) > 300
or vim.fn.getfsize(vim.fn.expand("%")) > 1024*1024
or vim.fn.getfsize(vim.fn.expand("%")) > 1024 * 1024
then
return true
end
@ -42,6 +42,10 @@ return {
[";"] = "textsubjects-container-outer",
},
},
endwise = {
enable = true
}
})
-- for improved commentstrings, needs corresponding plugin
@ -90,10 +94,10 @@ return {
"https://gitlab.com/HiPhish/nvim-ts-rainbow2.git",
{ "romgrk/nvim-treesitter-context", config = true },
"JoosepAlviste/nvim-ts-context-commentstring",
{
"RRethy/nvim-treesitter-textsubjects",
},
"RRethy/nvim-treesitter-textsubjects",
"windwp/nvim-ts-autotag",
"RRethy/nvim-treesitter-endwise",
},
},
}