Add treesitter based vim-endwise reimplementation

This commit is contained in:
Kenneth Benzie 2024-03-03 22:14:08 +00:00
parent bbccd0563e
commit 1d45d47556

View File

@ -1,58 +1,61 @@
return { return {
"nvim-treesitter/nvim-treesitter", 'nvim-treesitter/nvim-treesitter',
build = ":TSUpdate", dependencies = {
-- TODO: Fork this and add CMake support
'RRethy/nvim-treesitter-endwise',
},
build = ':TSUpdate',
config = function() config = function()
require('nvim-treesitter').setup() require('nvim-treesitter').setup()
local configs = require("nvim-treesitter.configs") local config = {
configs.setup({
ensure_installed = { ensure_installed = {
"asm", 'asm',
"bash", 'bash',
"c", 'c',
"cmake", 'cmake',
"cpp", 'cpp',
"css", 'css',
"csv", 'csv',
"cuda", 'cuda',
"diff", 'diff',
"disassembly", 'disassembly',
"dockerfile", 'dockerfile',
"dot", 'dot',
"doxygen", 'doxygen',
"git_config", 'git_config',
"git_rebase", 'git_rebase',
"gitattributes", 'gitattributes',
"gitignore", 'gitignore',
"glsl", 'glsl',
"gpg", 'gpg',
"hlsl", 'hlsl',
"html", 'html',
"ini", 'ini',
"javascript", 'javascript',
"jq", 'jq',
"json", 'json',
"llvm", 'llvm',
"lua", 'lua',
"make", 'make',
"meson", 'meson',
"ninja", 'ninja',
"objc", 'objc',
"objdump", 'objdump',
"printf", 'printf',
"proto", 'proto',
"python", 'python',
"query", 'query',
"regex", 'regex',
"requirements", 'requirements',
"rst", 'rst',
"ssh_config", 'ssh_config',
"strace", 'strace',
"tmux", 'tmux',
"toml", 'toml',
"vim", 'vim',
"vimdoc", 'vimdoc',
"xml", 'xml',
"yaml", 'yaml',
}, },
sync_install = false, sync_install = false,
highlight = { highlight = {
@ -61,6 +64,10 @@ return {
indent = { indent = {
enable = true, enable = true,
}, },
}) endwise = {
enable = true,
},
}
require('nvim-treesitter.configs').setup(config)
end end
} }