diff options
author | David Luevano Alvarado <david@luevano.xyz> | 2023-06-06 04:21:29 -0600 |
---|---|---|
committer | David Luevano Alvarado <david@luevano.xyz> | 2023-06-06 04:21:29 -0600 |
commit | 2ad3c42b0b1ac709821db1ebf1ab7a444d0b3a49 (patch) | |
tree | 799df46fec0ac28eea8bf80d1b19d150014c02e1 /lua/plugins | |
parent | 731f7031c78eba0c2d941b2f27cdf4c83324cdb3 (diff) |
fix treesitter not working because config was not set
Diffstat (limited to 'lua/plugins')
-rw-r--r-- | lua/plugins/treesitter.lua | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 4d3015a..6d423a8 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -4,12 +4,23 @@ return { 'nvim-treesitter/nvim-treesitter-textobjects', }, build = ':TSUpdate', + -- This needs to be manually pased into config and used in the function(_, opts) + -- as it has to be configured with the required...'.config' opts = { - ensure_installed = { 'go', 'lua', 'python', 'typescript', 'vimdoc', 'vim' }, + ensure_installed = { + 'go', + 'lua', + 'python', + 'typescript', + 'vimdoc', + 'vim', + }, auto_install = false, - highlight = { enable = true }, - indent = { enable = true, disable = { 'python' } }, + indent = { + enable = true, + disable = { 'python' }, + }, incremental_selection = { enable = true, keymaps = { @@ -65,5 +76,8 @@ return { }, }, }, - } + }, + config = function(_, opts) + require('nvim-treesitter.configs').setup(opts) + end, } |