summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorDavid Luevano Alvarado <david@luevano.xyz>2023-06-06 04:21:29 -0600
committerDavid Luevano Alvarado <david@luevano.xyz>2023-06-06 04:21:29 -0600
commit2ad3c42b0b1ac709821db1ebf1ab7a444d0b3a49 (patch)
tree799df46fec0ac28eea8bf80d1b19d150014c02e1 /lua
parent731f7031c78eba0c2d941b2f27cdf4c83324cdb3 (diff)
fix treesitter not working because config was not set
Diffstat (limited to 'lua')
-rw-r--r--lua/plugins/treesitter.lua22
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,
}