mirror of
https://github.com/dam9000/kickstart-modular.nvim.git
synced 2026-03-30 01:31:30 +00:00
24 lines
730 B
Lua
24 lines
730 B
Lua
return {
|
|
{ -- Highlight, edit, and navigate code
|
|
'nvim-treesitter/nvim-treesitter',
|
|
lazy = false,
|
|
build = ':TSUpdate',
|
|
branch = 'main',
|
|
config = function()
|
|
local parsers = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' }
|
|
require('nvim-treesitter').install(parsers)
|
|
vim.api.nvim_create_autocmd('FileType', {
|
|
callback = function(args)
|
|
local buf, filetype = args.buf, args.match
|
|
|
|
local language = vim.treesitter.language.get_lang(filetype)
|
|
if not vim.tbl_contains(parsers, language) then return end
|
|
|
|
vim.treesitter.start()
|
|
end,
|
|
})
|
|
end,
|
|
},
|
|
}
|
|
-- vim: ts=2 sts=2 sw=2 et
|