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:
parent
ea7b2e632e
commit
1e47459801
2 changed files with 10 additions and 5 deletions
|
|
@ -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",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue