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