summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Baumgardner <26423650+rbaumgardner93@users.noreply.github.com>2024-03-11 19:18:45 -0400
committerGitHub <noreply@github.com>2024-03-11 19:18:45 -0400
commitc2aa6e2cf1766129520de459e000010856ef4f99 (patch)
treed87b340e769f513c279865cff7cee31dc6bbb7f8
parent14d0506334bcf4f96d22122a8647d31462c9792e (diff)
downloaddots-c2aa6e2cf1766129520de459e000010856ef4f99.tar.gz
feat: allow treesitter defaults to be overwritten from custom directory (#732)
-rw-r--r--nvim/init.lua17
1 files changed, 9 insertions, 8 deletions
diff --git a/nvim/init.lua b/nvim/init.lua
index cfbe00d..9216e60 100644
--- a/nvim/init.lua
+++ b/nvim/init.lua
@@ -779,17 +779,18 @@ require('lazy').setup({
{ -- 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: