Update new config for astronvim V6
This commit is contained in:
@@ -1,12 +1,20 @@
|
||||
-- Customize Treesitter
|
||||
-- --------------------
|
||||
-- Treesitter customizations are handled with AstroCore
|
||||
-- as nvim-treesitter simply provides a download utility for parsers
|
||||
|
||||
---@type LazySpec
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
lazy = false,
|
||||
dependencies = "AstroNvim/astrocore",
|
||||
opts = function(_, opts)
|
||||
-- add more things to the ensure_installed table protecting against community packs modifying it
|
||||
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, {
|
||||
"AstroNvim/astrocore",
|
||||
---@type AstroCoreOpts
|
||||
opts = {
|
||||
treesitter = {
|
||||
highlight = true, -- enable/disable treesitter based highlighting
|
||||
indent = true, -- enable/disable treesitter based indentation
|
||||
auto_install = true, -- enable/disable automatic installation of detected languages
|
||||
ensure_installed = {
|
||||
"lua",
|
||||
"vim",
|
||||
"cpp",
|
||||
"c",
|
||||
"bash",
|
||||
@@ -32,43 +40,8 @@ return {
|
||||
"typescript",
|
||||
"vimdoc",
|
||||
"xml"
|
||||
})
|
||||
end,
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup {
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false
|
||||
},
|
||||
ensure_installed = {
|
||||
"lua",
|
||||
"cpp",
|
||||
"c",
|
||||
"bash",
|
||||
"vim",
|
||||
"markdown",
|
||||
"asm",
|
||||
"cmake",
|
||||
"css",
|
||||
"html",
|
||||
"javascript",
|
||||
"printf",
|
||||
"fish",
|
||||
"git_config",
|
||||
"git_rebase",
|
||||
"gitcommit",
|
||||
"gitignore",
|
||||
"gitattributes",
|
||||
"java",
|
||||
"meson",
|
||||
"ninja",
|
||||
"python",
|
||||
"sql",
|
||||
"typescript",
|
||||
"vimdoc",
|
||||
"xml"
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
-- add more arguments for adding more treesitter parsers
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user