treesitter for nvim 0.12

main
Mathias Rothenhaeusler 2026-04-19 13:01:12 +02:00
parent d1167c2fe9
commit 09e50948e4
1 changed files with 33 additions and 18 deletions

View File

@ -152,25 +152,40 @@ require('lazy').setup({
}, },
}, },
{ -- Highlight, edit, and navigate code { -- Highlight, edit, and navigate code
'nvim-treesitter/nvim-treesitter', 'nvim-treesitter/nvim-treesitter',
lazy = false, branch="main",
build = ':TSUpdate', lazy = false,
config = function() build = ':TSUpdate',
require('nvim-treesitter.configs').setup({ -- config = function()
ensure_installed = { 'bash', 'php', 'rust', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' }, -- require('nvim-treesitter.configs').setup({
auto_install = true, -- ensure_installed = { 'bash', 'php', 'rust', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },
highlight = { -- auto_install = true,
enable = true, -- highlight = {
additional_vim_regex_highlighting = { 'ruby' }, -- enable = true,
}, -- additional_vim_regex_highlighting = { 'ruby' },
indent = { enable = true, disable = { 'ruby' } }, -- },
}) -- indent = { enable = true, disable = { 'ruby' } },
end, -- })
dependencies = { -- end,
'nvim-treesitter/nvim-treesitter-textobjects', dependencies = {
'nvim-treesitter/nvim-treesitter-textobjects',
branch="main"
},
init = function()
local ensureInstalled = {
'lua', 'python', 'typescript',
-- ... your parsers
}
local alreadyInstalled = require('nvim-treesitter.config').get_installed()
local parsersToInstall = vim.iter(ensureInstalled)
:filter(function(parser)
return not vim.tbl_contains(alreadyInstalled, parser)
end)
:totable()
require('nvim-treesitter').install(parsersToInstall)
end,
}, },
},
-- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart -- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart
-- These are some example plugins that I've included in the kickstart repository. -- These are some example plugins that I've included in the kickstart repository.