mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-24 17:58:46 +02:00
enc: upgrade v2 to v2.5
This commit is contained in:
parent
68ea712b98
commit
609234c086
443 changed files with 5224 additions and 90746 deletions
47
lua/pcode/plugins/_treesitter.lua
Normal file
47
lua/pcode/plugins/_treesitter.lua
Normal file
|
@ -0,0 +1,47 @@
|
|||
return {
|
||||
{ "nvim-lua/plenary.nvim", event = "VeryLazy" },
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
event = { "BufRead", "VeryLazy" },
|
||||
version = false,
|
||||
build = ":TSUpdate",
|
||||
lazy = true,
|
||||
cmd = {
|
||||
"TSInstall",
|
||||
"TSInstallInfo",
|
||||
"TSInstallSync",
|
||||
"TSUpdate",
|
||||
"TSUpdateSync",
|
||||
"TSUninstall",
|
||||
"TSUninstallInfo",
|
||||
"TSInstallFromGrammar",
|
||||
},
|
||||
opts = function()
|
||||
return {
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
ensure_installed = { "lua", "luadoc", "printf", "vim", "vimdoc" },
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
},
|
||||
autopairs = {
|
||||
enable = true,
|
||||
},
|
||||
}
|
||||
end,
|
||||
config = function(_, opts)
|
||||
if type(opts.ensure_installed) == "table" then
|
||||
---@type table<string, boolean>
|
||||
local added = {}
|
||||
opts.ensure_installed = vim.tbl_filter(function(lang)
|
||||
if added[lang] then
|
||||
return false
|
||||
end
|
||||
added[lang] = true
|
||||
return true
|
||||
end, opts.ensure_installed)
|
||||
end
|
||||
require("nvim-treesitter.configs").setup(opts)
|
||||
end,
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue