Commit Diff


commit - 3e41d35e0e1337c81a2ead6586b21ee869b31c8b
commit + 7eb76a2632cd7045ebe39de1b00c2ffc2a8a11c5
blob - 6628c28a24012404d3cb4d16909295ea5101c780
blob + b7f305b6cd0ac13e033042e25676b0ff93a8485c
--- init.lua
+++ init.lua
@@ -8,6 +8,7 @@ require('lazy').setup({
     require('plugins/mason'),
     require('plugins/lspconfig'),
     require('plugins/conform'),
+    require('plugins/treesitter'),
 })
 
 require('config.options')
blob - 7b67c03b8812e76f6c175380984d19803cd0d6a5
blob + 3716972f3623f4a5575db61146ccb124b711c09b
--- lazy-lock.json
+++ lazy-lock.json
@@ -5,6 +5,7 @@
   "mason-tool-installer.nvim": { "branch": "main", "commit": "62f821a14e20f3f2ee358cd44d0b3d299a508e72" },
   "mason.nvim": { "branch": "main", "commit": "7c7318e8bae7e3536ef6b9e86b9e38e74f2e125e" },
   "nvim-lspconfig": { "branch": "master", "commit": "61e5109c8cf24807e4ae29813a3a82b31821dd45" },
+  "nvim-treesitter": { "branch": "master", "commit": "28d480e0624b259095e56f353ec911f9f2a0f404" },
   "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
   "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
   "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
blob - /dev/null
blob + ed5f4ea6758c1dcfa8303a2cc6c6107778c976c5 (mode 644)
--- /dev/null
+++ lua/plugins/treesitter.lua
@@ -0,0 +1,27 @@
+return {
+  {
+    'nvim-treesitter/nvim-treesitter',
+    build = ':TSUpdate',
+    main = 'nvim-treesitter.configs', -- Sets main module to use for opts
+    -- [[ Configure Treesitter ]] See `:help nvim-treesitter`
+    opts = {
+      ensure_installed = { 'html', 'lua', 'typescript', 'javascript', 'php' },
+      -- Autoinstall languages that are not installed
+      auto_install = false,
+      highlight = {
+        enable = true,
+        -- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules.
+        --  If you are experiencing weird indenting issues, add the language to
+        --  the list of additional_vim_regex_highlighting and disabled languages for indent.
+        -- additional_vim_regex_highlighting = { 'ruby' },
+      },
+      indent = { enable = true, disable = { 'ruby' } },
+    },
+    -- 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:
+    --
+    --    - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod`
+    --    - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
+    --    - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
+  },
+}