diff options
author | Damjan 9000 <damjan.9000@gmail.com> | 2024-03-12 01:13:38 +0100 |
---|---|---|
committer | Damjan 9000 <damjan.9000@gmail.com> | 2024-03-12 01:13:38 +0100 |
commit | 7da09adddbe4533376fea9b80267bd72281770b5 (patch) | |
tree | b9b6d18f93f0082979ad38f67e2c50c9238c52e4 /lua/kickstart/plugins/treesitter.lua | |
parent | 2238a5d19188e5ee0ef5f21e20af48c49fc12c21 (diff) | |
parent | cb1f16b8cad0c06eac841a227825d9f23b4acba0 (diff) |
Merge 'upstream' rename <C-t>, use opts for treesitter
- chore: rename <C-T> to <C-t> for consistency
- feat: allow treesitter defaults to be overwritten from custom directory
Diffstat (limited to 'lua/kickstart/plugins/treesitter.lua')
-rw-r--r-- | lua/kickstart/plugins/treesitter.lua | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lua/kickstart/plugins/treesitter.lua b/lua/kickstart/plugins/treesitter.lua index 6c4f9d0..689c5ce 100644 --- a/lua/kickstart/plugins/treesitter.lua +++ b/lua/kickstart/plugins/treesitter.lua @@ -2,17 +2,18 @@ return { { -- Highlight, edit, and navigate code 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate', - config = function() + opts = { + ensure_installed = { 'bash', 'c', 'html', 'lua', 'markdown', 'vim', 'vimdoc' }, + -- Autoinstall languages that are not installed + auto_install = true, + highlight = { enable = true }, + indent = { enable = true }, + }, + config = function(_, opts) -- [[ Configure Treesitter ]] See `:help nvim-treesitter` ---@diagnostic disable-next-line: missing-fields - require('nvim-treesitter.configs').setup { - ensure_installed = { 'bash', 'c', 'html', 'lua', 'markdown', 'vim', 'vimdoc' }, - -- Autoinstall languages that are not installed - auto_install = true, - highlight = { enable = true }, - indent = { enable = true }, - } + require('nvim-treesitter.configs').setup(opts) -- There are additional nvim-treesitter modules that you can use to interact -- with nvim-treesitter. You should go explore a few and see what interests you: |