diff options
| author | Trey Bastian <hello@treybastian.com> | 2025-10-29 11:52:37 +0000 |
|---|---|---|
| committer | Trey Bastian <hello@treybastian.com> | 2025-10-29 11:52:37 +0000 |
| commit | 019a93697352f442edfbf7b12abcaa0ff4293cfd (patch) | |
| tree | 357523f499c13438cc61300f1812b4215a526cb1 /lua/config/treesitter.lua | |
new and improved nvim config
Diffstat (limited to 'lua/config/treesitter.lua')
| -rw-r--r-- | lua/config/treesitter.lua | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lua/config/treesitter.lua b/lua/config/treesitter.lua new file mode 100644 index 0000000..030d987 --- /dev/null +++ b/lua/config/treesitter.lua @@ -0,0 +1,28 @@ +local vim = vim +vim.pack.add({ + "https://github.com/windwp/nvim-ts-autotag", + "https://github.com/HiPhish/rainbow-delimiters.nvim", + "https://github.com/RRethy/nvim-treesitter-endwise", + "https://github.com/nvim-treesitter/nvim-treesitter-context", + "https://github.com/nvim-treesitter/nvim-treesitter", +}) + +require("nvim-treesitter").setup({ + sync_install = false, + auto_install = true, + highlight = { enable = true }, + autotag = { enable = true }, + rainbow = { enable = true, extended_mode = true }, + indent = { enable = true }, + endwise = { enable = true }, +}) + +vim.api.nvim_create_autocmd("PackChanged", { + callback = function() + vim.cmd("TSUpdate") + end, +}) + +require("treesitter-context").setup({ + max_lines = 4, +}) |
