Skip to content

Commit 7ea937d

Browse files
committed
fix: as far as i can tell i updated to the right tree sitter stuff
1 parent 3ddda4a commit 7ea937d

File tree

1 file changed

+10
-22
lines changed

1 file changed

+10
-22
lines changed

init.lua

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -927,28 +927,16 @@ require('lazy').setup({
927927
},
928928
{ -- Highlight, edit, and navigate code
929929
'nvim-treesitter/nvim-treesitter',
930-
build = ':TSUpdate',
931-
main = 'nvim-treesitter.config', -- Sets main module to use for opts
932-
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
933-
opts = {
934-
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },
935-
-- Autoinstall languages that are not installed
936-
auto_install = true,
937-
highlight = {
938-
enable = true,
939-
-- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules.
940-
-- If you are experiencing weird indenting issues, add the language to
941-
-- the list of additional_vim_regex_highlighting and disabled languages for indent.
942-
additional_vim_regex_highlighting = { 'ruby' },
943-
},
944-
indent = { enable = true, disable = { 'ruby' } },
945-
},
946-
-- There are additional nvim-treesitter modules that you can use to interact
947-
-- with nvim-treesitter. You should go explore a few and see what interests you:
948-
--
949-
-- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod`
950-
-- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
951-
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
930+
config = function()
931+
local filetypes = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' }
932+
require('nvim-treesitter').install(filetypes)
933+
vim.api.nvim_create_autocmd('FileType', {
934+
pattern = filetypes,
935+
callback = function()
936+
vim.treesitter.start()
937+
end,
938+
})
939+
end,
952940
},
953941

954942
-- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the

0 commit comments

Comments
 (0)