Inserted mandatory lines to treesitter.lua

This commit is contained in:
2024-12-30 16:24:00 +01:00
parent 2baffaf4e8
commit a7db2033d9

View File

@@ -1,57 +1,62 @@
return { return {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
event = { "BufReadPre", "BufNewFile" }, event = { "BufReadPre", "BufNewFile" },
build = ":TSUpdate", build = ":TSUpdate",
dependencies = { dependencies = {
"windwp/nvim-ts-autotag", "windwp/nvim-ts-autotag",
}, },
config = function() config = function()
-- import nvim-treesitter plugin -- import nvim-treesitter plugin
local treesitter = require("nvim-treesitter.configs") local treesitter = require("nvim-treesitter.configs")
-- configure treesitter -- configure treesitter
treesitter.setup({ -- enable syntax highlighting treesitter.setup({ -- enable syntax highlighting
highlight = { highlight = {
enable = true, enable = true,
}, },
-- enable indentation
indent = { enable = true }, sync_install = false,
-- enable autotagging (w/ nvim-ts-autotag plugin) ignore_install = {},
autotag = { auto_install = false,
enable = true,
}, -- enable indentation
-- ensure these language parsers are installed indent = { enable = true },
ensure_installed = { -- enable autotagging (w/ nvim-ts-autotag plugin)
"json", autotag = {
"javascript", enable = true,
"typescript", },
"tsx", -- ensure these language parsers are installed
"yaml", ensure_installed = {
"html", "json",
"css", "javascript",
"prisma", "typescript",
"markdown", "tsx",
"markdown_inline", "yaml",
"svelte", "html",
"graphql", "css",
"bash", "prisma",
"lua", "markdown",
"vim", "markdown_inline",
"dockerfile", "svelte",
"gitignore", "graphql",
"query", "bash",
"vimdoc", "lua",
"c", "vim",
}, "dockerfile",
incremental_selection = { "gitignore",
enable = true, "query",
keymaps = { "vimdoc",
init_selection = "<C-space>", "c",
node_incremental = "<C-space>", },
scope_incremental = false, incremental_selection = {
node_decremental = "<bs>", enable = true,
}, keymaps = {
}, init_selection = "<C-space>",
}) node_incremental = "<C-space>",
end, scope_incremental = false,
node_decremental = "<bs>",
},
},
})
end,
} }