Files
nvim/lua/plugins/treesitter.lua

33 lines
768 B
Lua
Raw Normal View History

2025-04-12 23:49:02 +01:00
-- Highlight, edit, and navigate code
return {
'nvim-treesitter/nvim-treesitter',
2026-03-31 14:15:12 +01:00
branch = 'main',
2025-04-12 23:49:02 +01:00
build = ':TSUpdate',
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
2026-03-31 14:15:12 +01:00
config = function()
local langs = {
2025-04-12 23:49:02 +01:00
'bash',
'c',
'diff',
'html',
'lua',
'luadoc',
'markdown',
'markdown_inline',
'query',
'vim',
'vimdoc',
2026-03-31 14:15:12 +01:00
'php',
'yaml',
}
require('nvim-treesitter').install(langs)
vim.api.nvim_create_autocmd('FileType', {
pattern = langs,
callback = function()
vim.treesitter.start()
end,
})
end,
2025-04-12 23:49:02 +01:00
}