dotfiles/nvim/lua/plugins/treesitter.lua

77 lines
1.7 KiB
Lua
Raw Normal View History

2024-10-27 16:21:40 +00:00
return {
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function()
2026-03-02 17:09:23 +00:00
require("nvim-treesitter").setup({
2024-10-27 16:21:40 +00:00
ensure_installed = {
2026-03-02 17:09:23 +00:00
"json", "javascript", "typescript", "tsx",
"yaml", "html", "css", "markdown", "markdown_inline",
"bash", "lua", "vim", "dockerfile", "gitignore",
"c", "python", "hcl",
2024-10-27 16:21:40 +00:00
},
2026-03-02 17:09:23 +00:00
highlight = { enable = true },
indent = { enable = true },
2024-10-27 16:21:40 +00:00
})
end,
}
2026-03-02 17:09:23 +00:00
-- return {
-- "nvim-treesitter/nvim-treesitter",
-- -- event = { "BufReadPre", "BufNewFile" },
-- build = ":TSUpdate",
-- -- dependencies = {
-- -- "windwp/nvim-ts-autotag",
-- -- },
-- config = function()
-- local treesitter = require("nvim-treesitter.configs")
-- treesitter.setup({
-- highlight = {
-- enable = true,
-- additional_vim_regex_highlighting = false,
-- },
-- indent = { enable = true },
-- -- autotag = {
-- -- enable = true,
-- -- },
-- ensure_installed = {
-- "json",
-- "javascript",
-- "typescript",
-- "tsx",
-- "yaml",
-- "html",
-- "css",
-- "markdown",
-- "markdown_inline",
-- "bash",
-- "lua",
-- "vim",
-- "dockerfile",
-- "gitignore",
-- "c",
-- "python",
-- "hcl",
-- },
-- incremental_selection = {
-- enable = true,
-- keymaps = {
-- init_selection = "<C-space>",
-- node_incremental = "<C-space>",
-- scope_incremental = false,
-- node_decremental = "<bs>",
-- },
-- },
-- -- rainbow = {
-- -- enable = true,
-- -- disable = { "html" },
-- -- extended_mode = false,
-- -- max_file_lines = nil,
-- -- },
-- -- context_commentstring = {
-- -- enable = true,
-- -- enable_autocmd = false,
-- -- },
-- })
-- end,
-- }