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

@ -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",
},
},
}