56 lines
1.1 KiB
Lua
56 lines
1.1 KiB
Lua
require("nvim-treesitter.configs").setup({
|
|
ensure_installed = {
|
|
"bash",
|
|
"css",
|
|
"go",
|
|
"gomod",
|
|
"html",
|
|
"json",
|
|
"json5",
|
|
"jsonc",
|
|
"lua",
|
|
"regex",
|
|
"scss",
|
|
"toml",
|
|
"vim",
|
|
"yaml",
|
|
},
|
|
highlight = {
|
|
enable = true,
|
|
use_languagetree = true,
|
|
additional_vim_regex_highlighting = false,
|
|
},
|
|
indent = { enable = true },
|
|
incremental_selection = { enable = true },
|
|
query_linter = {
|
|
enable = true,
|
|
use_virtual_text = true,
|
|
lint_events = { "BufWrite", "CursorHold" },
|
|
},
|
|
textobjects = {
|
|
select = {
|
|
enable = true,
|
|
lookahead = true,
|
|
keymaps = {
|
|
["af"] = "@function.outer",
|
|
["if"] = "@function.inner",
|
|
["ac"] = "@class.outer",
|
|
["ic"] = "@class.inner",
|
|
},
|
|
},
|
|
rainbow = {
|
|
enable = true,
|
|
extended_mode = true, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean
|
|
max_file_lines = nil, -- Do not enable for files with more than n lines, int
|
|
},
|
|
autopairs = { enable = true },
|
|
context_commentstring = {
|
|
enable = true,
|
|
config = {
|
|
c = "// %s",
|
|
lua = "-- %s",
|
|
},
|
|
},
|
|
},
|
|
})
|