33 lines
768 B
Lua
33 lines
768 B
Lua
-- Highlight, edit, and navigate code
|
|
return {
|
|
'nvim-treesitter/nvim-treesitter',
|
|
branch = 'main',
|
|
build = ':TSUpdate',
|
|
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
|
config = function()
|
|
local langs = {
|
|
'bash',
|
|
'c',
|
|
'diff',
|
|
'html',
|
|
'lua',
|
|
'luadoc',
|
|
'markdown',
|
|
'markdown_inline',
|
|
'query',
|
|
'vim',
|
|
'vimdoc',
|
|
'php',
|
|
'yaml',
|
|
}
|
|
require('nvim-treesitter').install(langs)
|
|
|
|
vim.api.nvim_create_autocmd('FileType', {
|
|
pattern = langs,
|
|
callback = function()
|
|
vim.treesitter.start()
|
|
end,
|
|
})
|
|
end,
|
|
}
|