nvim: Update treesitter config

This commit is contained in:
Václav Uruba 2025-11-30 16:17:43 +01:00
parent fe15a5490f
commit 27cb40adcf
Signed by: uruba
GPG Key ID: 9D8E987C4B2E1E9C

View File

@ -9,54 +9,55 @@ return {
dependencies = {
"windwp/nvim-ts-autotag",
},
config = function()
config = function(_, opts)
local treesitter = require("nvim-treesitter.configs")
treesitter.setup({
highlight = {
enable = true,
},
indent = {
enable = true,
},
autotag = {
enable = true,
},
ensure_installed = {
"bash",
"css",
"dockerfile",
"gitignore",
"go",
"gomod",
"gosum",
"gowork",
"html",
"http",
"hurl",
"javascript",
"json",
"liquid",
"lua",
"markdown",
"markdown_inline",
"php",
"svelte",
"twig",
"vim",
"yaml",
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = "<C-space>",
node_incremental = "<C-space>",
scope_incremental = false,
node_decremental = "<bs>",
},
},
})
treesitter.setup(opts)
end,
opts = {
highlight = {
enable = true,
},
indent = {
enable = true,
},
autotag = {
enable = true,
},
ensure_installed = {
"bash",
"css",
"dockerfile",
"gitignore",
"go",
"gomod",
"gosum",
"gowork",
"html",
"http",
"hurl",
"javascript",
"json",
"liquid",
"lua",
"markdown",
"markdown_inline",
"php",
"svelte",
"twig",
"vim",
"yaml",
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = "<C-space>",
node_incremental = "<C-space>",
scope_incremental = false,
node_decremental = "<bs>",
},
},
},
},
{
"nvim-treesitter/nvim-treesitter-context",