From 2ad3c42b0b1ac709821db1ebf1ab7a444d0b3a49 Mon Sep 17 00:00:00 2001
From: David Luevano Alvarado <david@luevano.xyz>
Date: Tue, 6 Jun 2023 04:21:29 -0600
Subject: fix treesitter not working because config was not set

---
 lua/plugins/treesitter.lua | 22 ++++++++++++++++++----
 1 file 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,
 }
-- 
cgit v1.2.3-70-g09d2