diff options
author | Ryan Baumgardner <26423650+rbaumgardner93@users.noreply.github.com> | 2024-03-11 19:18:45 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-11 19:18:45 -0400 |
commit | c0d6f9892442243b4586c6ef9d246b8b653cf259 (patch) | |
tree | 2a40b1e8d517400903e0ed898cb5b8f9522ec49c /init.lua | |
parent | 8de494fff222f4fe944338875c339d309ff83d1f (diff) |
feat: allow treesitter defaults to be overwritten from custom directory (#732)
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -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: |