Merge branch 'main' into lang/typst

This commit is contained in:
Võ Quang Chiến 2025-04-14 21:32:13 +07:00 committed by GitHub
commit 6b69f7a882
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 541 additions and 301 deletions

View file

@ -1,17 +1,4 @@
return {
{
import = "lazyvim.plugins.extras.coding.nvim-cmp",
enabled = function()
return LazyVim.cmp_engine() == "nvim-cmp"
end,
},
{
import = "lazyvim.plugins.extras.coding.blink",
enabled = function()
return LazyVim.cmp_engine() == "blink.cmp"
end,
},
-- auto pairs
{
"echasnovski/mini.pairs",

View file

@ -1,131 +1,5 @@
return {
-- file explorer
{
"nvim-neo-tree/neo-tree.nvim",
cmd = "Neotree",
keys = {
{
"<leader>fe",
function()
require("neo-tree.command").execute({ toggle = true, dir = LazyVim.root() })
end,
desc = "Explorer NeoTree (Root Dir)",
},
{
"<leader>fE",
function()
require("neo-tree.command").execute({ toggle = true, dir = vim.uv.cwd() })
end,
desc = "Explorer NeoTree (cwd)",
},
{ "<leader>e", "<leader>fe", desc = "Explorer NeoTree (Root Dir)", remap = true },
{ "<leader>E", "<leader>fE", desc = "Explorer NeoTree (cwd)", remap = true },
{
"<leader>ge",
function()
require("neo-tree.command").execute({ source = "git_status", toggle = true })
end,
desc = "Git Explorer",
},
{
"<leader>be",
function()
require("neo-tree.command").execute({ source = "buffers", toggle = true })
end,
desc = "Buffer Explorer",
},
},
deactivate = function()
vim.cmd([[Neotree close]])
end,
init = function()
-- FIX: use `autocmd` for lazy-loading neo-tree instead of directly requiring it,
-- because `cwd` is not set up properly.
vim.api.nvim_create_autocmd("BufEnter", {
group = vim.api.nvim_create_augroup("Neotree_start_directory", { clear = true }),
desc = "Start Neo-tree with directory",
once = true,
callback = function()
if package.loaded["neo-tree"] then
return
else
local stats = vim.uv.fs_stat(vim.fn.argv(0))
if stats and stats.type == "directory" then
require("neo-tree")
end
end
end,
})
end,
opts = {
sources = { "filesystem", "buffers", "git_status" },
open_files_do_not_replace_types = { "terminal", "Trouble", "trouble", "qf", "Outline" },
filesystem = {
bind_to_cwd = false,
follow_current_file = { enabled = true },
use_libuv_file_watcher = true,
},
window = {
mappings = {
["l"] = "open",
["h"] = "close_node",
["<space>"] = "none",
["Y"] = {
function(state)
local node = state.tree:get_node()
local path = node:get_id()
vim.fn.setreg("+", path, "c")
end,
desc = "Copy Path to Clipboard",
},
["O"] = {
function(state)
require("lazy.util").open(state.tree:get_node().path, { system = true })
end,
desc = "Open with System Application",
},
["P"] = { "toggle_preview", config = { use_float = false } },
},
},
default_component_configs = {
indent = {
with_expanders = true, -- if nil and file nesting is enabled, will enable expanders
expander_collapsed = "",
expander_expanded = "",
expander_highlight = "NeoTreeExpander",
},
git_status = {
symbols = {
unstaged = "󰄱",
staged = "󰱒",
},
},
},
},
config = function(_, opts)
local function on_move(data)
Snacks.rename.on_rename_file(data.source, data.destination)
end
local events = require("neo-tree.events")
opts.event_handlers = opts.event_handlers or {}
vim.list_extend(opts.event_handlers, {
{ event = events.FILE_MOVED, handler = on_move },
{ event = events.FILE_RENAMED, handler = on_move },
})
require("neo-tree").setup(opts)
vim.api.nvim_create_autocmd("TermClose", {
pattern = "*lazygit",
callback = function()
if package.loaded["neo-tree.sources.git_status"] then
require("neo-tree.sources.git_status").refresh()
end
end,
})
end,
},
-- search/replace in multiple files
{
"MagicDuck/grug-far.nvim",
@ -384,23 +258,4 @@ return {
{ "<leader>sT", "<cmd>TodoTelescope keywords=TODO,FIX,FIXME<cr>", desc = "Todo/Fix/Fixme" },
},
},
{
import = "lazyvim.plugins.extras.editor.fzf",
enabled = function()
return LazyVim.pick.want() == "fzf"
end,
},
{
import = "lazyvim.plugins.extras.editor.telescope",
enabled = function()
return LazyVim.pick.want() == "telescope"
end,
},
{
import = "lazyvim.plugins.extras.editor.snacks_picker",
enabled = function()
return LazyVim.pick.want() == "snacks"
end,
},
}

View file

@ -1,19 +1,3 @@
local M = {}
---@param kind string
function M.pick(kind)
return function()
local actions = require("CopilotChat.actions")
local items = actions[kind .. "_actions"]()
if not items then
LazyVim.warn("No " .. kind .. " found on the current line")
return
end
local ok = pcall(require, "fzf-lua")
require("CopilotChat.integrations." .. (ok and "fzflua" or "telescope")).pick(items)
end
end
return {
{
"CopilotC-Nvim/CopilotChat.nvim",
@ -53,16 +37,25 @@ return {
{
"<leader>aq",
function()
local input = vim.fn.input("Quick Chat: ")
if input ~= "" then
require("CopilotChat").ask(input)
end
vim.ui.input({
prompt = "Quick Chat: ",
}, function(input)
if input ~= "" then
require("CopilotChat").ask(input)
end
end)
end,
desc = "Quick Chat (CopilotChat)",
mode = { "n", "v" },
},
-- Show prompts actions with telescope
{ "<leader>ap", M.pick("prompt"), desc = "Prompt Actions (CopilotChat)", mode = { "n", "v" } },
{
"<leader>ap",
function()
require("CopilotChat").select_prompt()
end,
desc = "Prompt Actions (CopilotChat)",
mode = { "n", "v" },
},
},
config = function(_, opts)
local chat = require("CopilotChat")

View file

@ -79,7 +79,10 @@ return {
-- with blink.compat
compat = {},
default = { "lsp", "path", "snippets", "buffer" },
cmdline = {},
},
cmdline = {
enabled = false,
},
keymap = {
@ -140,6 +143,7 @@ return {
items = transform_items and transform_items(ctx, items) or items
for _, item in ipairs(items) do
item.kind = kind_idx or item.kind
item.kind_icon = LazyVim.config.icons.kinds[item.kind_name] or item.kind_icon or nil
end
return items
end

View file

@ -140,21 +140,25 @@ return {
end
-- Standalone --
local blink = require("blink.cmp")
expand_select_override = function(snippets, insert)
-- Schedule, otherwise blink's virtual text is not removed on vim.ui.select
require("blink.cmp").cancel()
blink.cancel()
vim.schedule(function()
MiniSnippets.default_select(snippets, insert)
end)
end
--
-- Blink performs a require on blink.cmp.sources.snippets.default
-- By removing the source, the default engine will not be used
-- By removing the source, that default engine will not be used
opts.sources.default = vim.tbl_filter(function(source)
return source ~= "snippets"
end, opts.sources.default)
opts.snippets = { -- need to repeat blink's preset here
expand = expand_from_lsp,
expand = function(snippet)
expand_from_lsp(snippet)
blink.resubscribe()
end,
active = function()
return MiniSnippets.session.get(false) ~= nil
end,

View file

@ -4,7 +4,6 @@
-- and more.
return {
"echasnovski/mini.surround",
recommended = true,
keys = function(_, keys)
-- Populate the keys based on the user's options
local opts = LazyVim.opts("mini.surround")

View file

@ -1,5 +1,6 @@
return {
"danymat/neogen",
dependencies = LazyVim.has("mini.snippets") and { "mini.snippets" } or {},
cmd = "Neogen",
keys = {
{
@ -17,6 +18,7 @@ return {
local map = {
["LuaSnip"] = "luasnip",
["mini.snippets"] = "mini",
["nvim-snippy"] = "snippy",
["vim-vsnip"] = "vsnip",
}

View file

@ -40,7 +40,6 @@ end
return {
desc = "Awesome picker for FZF (alternative to Telescope)",
recommended = true,
{
"ibhagwan/fzf-lua",
cmd = "FzfLua",
@ -286,16 +285,13 @@ return {
{
"neovim/nvim-lspconfig",
opts = function()
if LazyVim.pick.want() ~= "fzf" then
return
end
local Keys = require("lazyvim.plugins.lsp.keymaps").get()
-- stylua: ignore
vim.list_extend(Keys, {
{ "gd", "<cmd>FzfLua lsp_definitions jump_to_single_result=true ignore_current_line=true<cr>", desc = "Goto Definition", has = "definition" },
{ "gr", "<cmd>FzfLua lsp_references jump_to_single_result=true ignore_current_line=true<cr>", desc = "References", nowait = true },
{ "gI", "<cmd>FzfLua lsp_implementations jump_to_single_result=true ignore_current_line=true<cr>", desc = "Goto Implementation" },
{ "gy", "<cmd>FzfLua lsp_typedefs jump_to_single_result=true ignore_current_line=true<cr>", desc = "Goto T[y]pe Definition" },
{ "gd", "<cmd>FzfLua lsp_definitions jump1=true ignore_current_line=true<cr>", desc = "Goto Definition", has = "definition" },
{ "gr", "<cmd>FzfLua lsp_references jump1=true ignore_current_line=true<cr>", desc = "References", nowait = true },
{ "gI", "<cmd>FzfLua lsp_implementations jump1=true ignore_current_line=true<cr>", desc = "Goto Implementation" },
{ "gy", "<cmd>FzfLua lsp_typedefs jump1=true ignore_current_line=true<cr>", desc = "Goto T[y]pe Definition" },
})
end,
},

View file

@ -0,0 +1,128 @@
return {
-- file explorer
{
"nvim-neo-tree/neo-tree.nvim",
cmd = "Neotree",
keys = {
{
"<leader>fe",
function()
require("neo-tree.command").execute({ toggle = true, dir = LazyVim.root() })
end,
desc = "Explorer NeoTree (Root Dir)",
},
{
"<leader>fE",
function()
require("neo-tree.command").execute({ toggle = true, dir = vim.uv.cwd() })
end,
desc = "Explorer NeoTree (cwd)",
},
{ "<leader>e", "<leader>fe", desc = "Explorer NeoTree (Root Dir)", remap = true },
{ "<leader>E", "<leader>fE", desc = "Explorer NeoTree (cwd)", remap = true },
{
"<leader>ge",
function()
require("neo-tree.command").execute({ source = "git_status", toggle = true })
end,
desc = "Git Explorer",
},
{
"<leader>be",
function()
require("neo-tree.command").execute({ source = "buffers", toggle = true })
end,
desc = "Buffer Explorer",
},
},
deactivate = function()
vim.cmd([[Neotree close]])
end,
init = function()
-- FIX: use `autocmd` for lazy-loading neo-tree instead of directly requiring it,
-- because `cwd` is not set up properly.
vim.api.nvim_create_autocmd("BufEnter", {
group = vim.api.nvim_create_augroup("Neotree_start_directory", { clear = true }),
desc = "Start Neo-tree with directory",
once = true,
callback = function()
if package.loaded["neo-tree"] then
return
else
local stats = vim.uv.fs_stat(vim.fn.argv(0))
if stats and stats.type == "directory" then
require("neo-tree")
end
end
end,
})
end,
opts = {
sources = { "filesystem", "buffers", "git_status" },
open_files_do_not_replace_types = { "terminal", "Trouble", "trouble", "qf", "Outline" },
filesystem = {
bind_to_cwd = false,
follow_current_file = { enabled = true },
use_libuv_file_watcher = true,
},
window = {
mappings = {
["l"] = "open",
["h"] = "close_node",
["<space>"] = "none",
["Y"] = {
function(state)
local node = state.tree:get_node()
local path = node:get_id()
vim.fn.setreg("+", path, "c")
end,
desc = "Copy Path to Clipboard",
},
["O"] = {
function(state)
require("lazy.util").open(state.tree:get_node().path, { system = true })
end,
desc = "Open with System Application",
},
["P"] = { "toggle_preview", config = { use_float = false } },
},
},
default_component_configs = {
indent = {
with_expanders = true, -- if nil and file nesting is enabled, will enable expanders
expander_collapsed = "",
expander_expanded = "",
expander_highlight = "NeoTreeExpander",
},
git_status = {
symbols = {
unstaged = "󰄱",
staged = "󰱒",
},
},
},
},
config = function(_, opts)
local function on_move(data)
Snacks.rename.on_rename_file(data.source, data.destination)
end
local events = require("neo-tree.events")
opts.event_handlers = opts.event_handlers or {}
vim.list_extend(opts.event_handlers, {
{ event = events.FILE_MOVED, handler = on_move },
{ event = events.FILE_RENAMED, handler = on_move },
})
require("neo-tree").setup(opts)
vim.api.nvim_create_autocmd("TermClose", {
pattern = "*lazygit",
callback = function()
if package.loaded["neo-tree.sources.git_status"] then
require("neo-tree.sources.git_status").refresh()
end
end,
})
end,
},
}

View file

@ -1,10 +1,10 @@
local pick = function()
local refactoring = require("refactoring")
if LazyVim.pick.picker.name == "telescope" then
return require("telescope").extensions.refactoring.refactors()
elseif LazyVim.pick.picker.name == "fzf" then
local fzf_lua = require("fzf-lua")
local results = require("refactoring").get_refactors()
local refactoring = require("refactoring")
local results = refactoring.get_refactors()
local opts = {
fzf_opts = {},
@ -16,6 +16,8 @@ local pick = function()
},
}
fzf_lua.fzf_exec(results, opts)
else
refactoring.select_refactor()
end
end

View file

@ -1,25 +1,24 @@
return {
{ "nvim-neo-tree/neo-tree.nvim", enabled = false },
{
"folke/snacks.nvim",
opts = { explorer = {} },
keys = {
{
"<leader>fe",
function()
Snacks.explorer({ cwd = LazyVim.root() })
end,
desc = "Explorer Snacks (root dir)",
},
{
"<leader>fE",
function()
Snacks.explorer()
end,
desc = "Explorer Snacks (cwd)",
},
{ "<leader>e", "<leader>fe", desc = "Explorer Snacks (root dir)", remap = true },
{ "<leader>E", "<leader>fE", desc = "Explorer Snacks (cwd)", remap = true },
desc = "Snacks File Explorer",
recommended = true,
"folke/snacks.nvim",
opts = { explorer = {} },
keys = {
{
"<leader>fe",
function()
Snacks.explorer({ cwd = LazyVim.root() })
end,
desc = "Explorer Snacks (root dir)",
},
{
"<leader>fE",
function()
Snacks.explorer()
end,
desc = "Explorer Snacks (cwd)",
},
{ "<leader>e", "<leader>fe", desc = "Explorer Snacks (root dir)", remap = true },
{ "<leader>E", "<leader>fE", desc = "Explorer Snacks (cwd)", remap = true },
},
}

View file

@ -72,9 +72,9 @@ return {
{ "<leader>fR", function() Snacks.picker.recent({ filter = { cwd = true }}) end, desc = "Recent (cwd)" },
{ "<leader>fp", function() Snacks.picker.projects() end, desc = "Projects" },
-- git
{ "<leader>gc", function() Snacks.picker.git_log() end, desc = "Git Log" },
{ "<leader>gd", function() Snacks.picker.git_diff() end, desc = "Git Diff (hunks)" },
{ "<leader>gs", function() Snacks.picker.git_status() end, desc = "Git Status" },
{ "<leader>gS", function() Snacks.picker.git_stash() end, desc = "Git Stash" },
-- Grep
{ "<leader>sb", function() Snacks.picker.lines() end, desc = "Buffer Lines" },
{ "<leader>sB", function() Snacks.picker.grep_buffers() end, desc = "Grep Open Buffers" },
@ -85,10 +85,12 @@ return {
{ "<leader>sW", LazyVim.pick("grep_word", { root = false }), desc = "Visual selection or word (cwd)", mode = { "n", "x" } },
-- search
{ '<leader>s"', function() Snacks.picker.registers() end, desc = "Registers" },
{ '<leader>s/', function() Snacks.picker.search_history() end, desc = "Search History" },
{ "<leader>sa", function() Snacks.picker.autocmds() end, desc = "Autocmds" },
{ "<leader>sc", function() Snacks.picker.command_history() end, desc = "Command History" },
{ "<leader>sC", function() Snacks.picker.commands() end, desc = "Commands" },
{ "<leader>sd", function() Snacks.picker.diagnostics() end, desc = "Diagnostics" },
{ "<leader>sD", function() Snacks.picker.diagnostics_buffer() end, desc = "Buffer Diagnostics" },
{ "<leader>sh", function() Snacks.picker.help() end, desc = "Help Pages" },
{ "<leader>sH", function() Snacks.picker.highlights() end, desc = "Highlights" },
{ "<leader>si", function() Snacks.picker.icons() end, desc = "Icons" },
@ -118,7 +120,7 @@ return {
win = {
input = {
keys = {
["<c-t>"] = {
["<a-t>"] = {
"trouble_open",
mode = { "n", "i" },
},
@ -133,9 +135,6 @@ return {
{
"neovim/nvim-lspconfig",
opts = function()
if LazyVim.pick.want() ~= "snacks" then
return
end
local Keys = require("lazyvim.plugins.lsp.keymaps").get()
-- stylua: ignore
vim.list_extend(Keys, {
@ -157,6 +156,61 @@ return {
{ "<leader>sT", function () Snacks.picker.todo_comments({ keywords = { "TODO", "FIX", "FIXME" } }) end, desc = "Todo/Fix/Fixme" },
},
},
{
"folke/snacks.nvim",
opts = function(_, opts)
table.insert(opts.dashboard.preset.keys, 3, {
icon = "",
key = "p",
desc = "Projects",
action = ":lua Snacks.picker.projects()",
})
end,
},
{
"goolord/alpha-nvim",
optional = true,
opts = function(_, dashboard)
local button = dashboard.button("p", "" .. " Projects", [[<cmd> lua Snacks.picker.projects() <cr>]])
button.opts.hl = "AlphaButtons"
button.opts.hl_shortcut = "AlphaShortcut"
table.insert(dashboard.section.buttons.val, 4, button)
end,
},
{
"echasnovski/mini.starter",
optional = true,
opts = function(_, opts)
local items = {
{
name = "Projects",
action = [[lua Snacks.picker.projects()]],
section = string.rep(" ", 22) .. "Telescope",
},
}
vim.list_extend(opts.items, items)
end,
},
{
"nvimdev/dashboard-nvim",
optional = true,
opts = function(_, opts)
if not vim.tbl_get(opts, "config", "center") then
return
end
local projects = {
action = "lua Snacks.picker.projects()",
desc = " Projects",
icon = "",
key = "p",
}
projects.desc = projects.desc .. string.rep(" ", 43 - #projects.desc)
projects.key_format = " %s"
table.insert(opts.config.center, 3, projects)
end,
},
{
"folke/flash.nvim",
optional = true,

View file

@ -61,9 +61,6 @@ return {
{
"nvim-telescope/telescope.nvim",
cmd = "Telescope",
enabled = function()
return LazyVim.pick.want() == "telescope"
end,
version = false, -- telescope did only one release, so use HEAD for now
dependencies = {
{
@ -267,9 +264,6 @@ return {
{
"stevearc/dressing.nvim",
lazy = true,
enabled = function()
return LazyVim.pick.want() == "telescope"
end,
init = function()
---@diagnostic disable-next-line: duplicate-set-field
vim.ui.select = function(...)
@ -287,9 +281,6 @@ return {
{
"neovim/nvim-lspconfig",
opts = function()
if LazyVim.pick.want() ~= "telescope" then
return
end
local Keys = require("lazyvim.plugins.lsp.keymaps").get()
-- stylua: ignore
vim.list_extend(Keys, {

View file

@ -37,7 +37,6 @@ return {
rangeVariableTypes = true,
},
analyses = {
fieldalignment = true,
nilness = true,
unusedparams = true,
unusedwrite = true,

View file

@ -48,7 +48,7 @@ return {
vim.api.nvim_create_autocmd("FileType", {
pattern = sql_ft,
callback = function()
if LazyVim.cmp_engine() == "nvim-cmp" then
if LazyVim.has_extra("coding.nvim-cmp") then
local cmp = require("cmp")
-- global sources

View file

@ -3,22 +3,12 @@ local pick_chezmoi = function()
require("telescope").extensions.chezmoi.find_files()
elseif LazyVim.pick.picker.name == "fzf" then
local fzf_lua = require("fzf-lua")
local results = require("chezmoi.commands").list()
local chezmoi = require("chezmoi.commands")
local opts = {
fzf_opts = {},
fzf_colors = true,
actions = {
["default"] = function(selected)
chezmoi.edit({
targets = { "~/" .. selected[1] },
args = { "--watch" },
})
end,
},
local actions = {
["enter"] = function(selected)
fzf_lua.actions.vimcmd_entry("ChezmoiEdit", selected, { cwd = os.getenv("HOME") })
end,
}
fzf_lua.fzf_exec(results, opts)
fzf_lua.files({ cmd = "chezmoi managed --include=files,symlinks", actions = actions })
elseif LazyVim.pick.picker.name == "snacks" then
local results = require("chezmoi.commands").list({
args = {
@ -65,6 +55,7 @@ return {
},
{
"xvzc/chezmoi.nvim",
cmd = { "ChezmoiEdit" },
keys = {
{
"<leader>sz",
@ -120,6 +111,27 @@ return {
table.insert(opts.config.center, 5, projects)
end,
},
{
"folke/snacks.nvim",
optional = true,
opts = function(_, opts)
local chezmoi_entry = {
icon = "",
key = "c",
desc = "Config",
action = pick_chezmoi,
}
local config_index
for i = #opts.dashboard.preset.keys, 1, -1 do
if opts.dashboard.preset.keys[i].key == "c" then
table.remove(opts.dashboard.preset.keys, i)
config_index = i
break
end
end
table.insert(opts.dashboard.preset.keys, config_index, chezmoi_entry)
end,
},
-- Filetype icons
{

View file

@ -42,12 +42,14 @@ return {
"pwntester/octo.nvim",
opts = function(_, opts)
vim.treesitter.language.register("markdown", "octo")
if LazyVim.has("telescope.nvim") then
if LazyVim.has_extra("editor.telescope") then
opts.picker = "telescope"
elseif LazyVim.has("fzf-lua") then
elseif LazyVim.has_extra("editor.fzf") then
opts.picker = "fzf-lua"
elseif LazyVim.has_extra("editor.snacks_picker") then
opts.picker = "snacks"
else
LazyVim.error("`octo.nvim` requires `telescope.nvim` or `fzf-lua`")
LazyVim.error("`octo.nvim` requires `telescope.nvim` or `fzf-lua` or `snacks.nvim`")
end
-- Keep some empty windows in sessions

View file

@ -13,7 +13,7 @@ function M.get()
end
-- stylua: ignore
M._keys = {
{ "<leader>cl", "<cmd>LspInfo<cr>", desc = "Lsp Info" },
{ "<leader>cl", function() Snacks.picker.lsp_config() end, desc = "Lsp Info" },
{ "gd", vim.lsp.buf.definition, desc = "Goto Definition", has = "definition" },
{ "gr", vim.lsp.buf.references, desc = "References", nowait = true },
{ "gI", vim.lsp.buf.implementation, desc = "Goto Implementation" },

View file

@ -325,18 +325,4 @@ return {
},
},
},
{
"folke/snacks.nvim",
opts = function(_, opts)
if not opts.picker then
return
end
table.insert(opts.dashboard.preset.keys, 3, {
icon = "",
key = "p",
desc = "Projects",
action = ":lua Snacks.picker.projects()",
})
end,
},
}

View file

@ -7,17 +7,40 @@ local prios = {
["lazyvim.plugins.extras.lang.typescript"] = 5,
["lazyvim.plugins.extras.coding.blink"] = 5,
["lazyvim.plugins.extras.formatting.prettier"] = 10,
-- default core extra priority is 20
-- default priority is 50
["lazyvim.plugins.extras.editor.aerial"] = 100,
["lazyvim.plugins.extras.editor.outline"] = 100,
["lazyvim.plugins.extras.ui.alpha"] = 19,
["lazyvim.plugins.extras.ui.dashboard-nvim"] = 19,
["lazyvim.plugins.extras.ui.mini-starter"] = 19,
}
if vim.g.xtras_prios then
prios = vim.tbl_deep_extend("force", prios, vim.g.xtras_prios or {})
end
local extras = {} ---@type string[]
local defaults = LazyVim.config.get_defaults()
-- Add extras from LazyExtras that are not disabled
for _, extra in ipairs(LazyVim.config.json.data.extras) do
local def = defaults[extra]
if not (def and def.enabled == false) then
extras[#extras + 1] = extra
end
end
-- Add default extras
for name, extra in pairs(defaults) do
if extra.enabled then
prios[name] = prios[name] or 20
extras[#extras + 1] = name
end
end
---@type string[]
local extras = LazyVim.dedup(LazyVim.config.json.data.extras)
extras = LazyVim.dedup(extras)
local version = vim.version()
local v = version.major .. "_" .. version.minor