Update
This commit is contained in:
61
lua/plugins/default/treesitter.lua
Normal file
61
lua/plugins/default/treesitter.lua
Normal file
@@ -0,0 +1,61 @@
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function()
|
||||
return {
|
||||
highlight = {
|
||||
enable = true,
|
||||
disable = { "latex" },
|
||||
-- additional_vim_regex_highlighting = { "markdown" },
|
||||
},
|
||||
-- ignore_install = { "latex" },
|
||||
indent = { enable = true, disable = { "python" } },
|
||||
context_commentstring = { enable = true, enable_autocmd = false },
|
||||
ensure_installed = {
|
||||
"latex",
|
||||
"bash",
|
||||
"c",
|
||||
"cpp",
|
||||
"html",
|
||||
"json",
|
||||
"lua",
|
||||
"luap",
|
||||
"markdown",
|
||||
"make",
|
||||
"markdown_inline",
|
||||
"scala",
|
||||
"python",
|
||||
"query",
|
||||
"toml",
|
||||
"regex",
|
||||
"vim",
|
||||
"yaml",
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "<cr>",
|
||||
node_incremental = "<cr>",
|
||||
scope_incremental = "\\",
|
||||
node_decremental = "<bs>",
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
rainbow = {
|
||||
enable = true,
|
||||
-- list of languages you want to disable the plugin for
|
||||
disable = { "jsx", "cpp" },
|
||||
-- Which query to use for finding delimiters
|
||||
query = "rainbow-parens",
|
||||
-- Highlight the entire buffer all at once
|
||||
},
|
||||
|
||||
keys = function()
|
||||
return {
|
||||
{ "<cr>", desc = "Increment selection" },
|
||||
{ "<bs>", desc = "Decrement selection", mode = "x" },
|
||||
}
|
||||
end,
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user