This commit is contained in:
2026-03-26 22:53:18 -05:00
parent 5516ece73f
commit 80593a39a6
2 changed files with 53 additions and 78 deletions

View File

@@ -57,9 +57,38 @@ vim.api.nvim_create_autocmd(
} }
) )
vim.pack.add( local packages = {
{src = "https://github.com/nvim-lua/plenary.nvim"},
{src = "https://github.com/rktjmp/lush.nvim"},
{src = "https://git.fifthgrid.com/sgraves/darcula_lush"}
}
if NV_DARCULA_ENABLE_COC then
vim.list_extend(
packages,
{
{src = "https://github.com/neoclide/coc.nvim", {version = "release"}},
{src = "https://github.com/fannheyward/telescope-coc.nvim"},
{src = "https://github.com/honza/vim-snippets"}
}
)
else
vim.list_extend(
packages,
{
{src = "https://github.com/neovim/nvim-lspconfig"},
{src = "https://github.com/WhoIsSethDaniel/mason-tool-installer.nvim"},
{src = "https://github.com/akinsho/flutter-tools.nvim"},
{src = "https://github.com/kosayoda/nvim-lightbulb"},
{src = "https://github.com/mason-org/mason-lspconfig.nvim"},
{src = "https://github.com/mason-org/mason.nvim"}
}
)
end
vim.list_extend(
packages,
{ {
{src = "https://git.fifthgrid.com/sgraves/darcula_lush"},
{ {
src = "https://github.com/catgoose/nvim-colorizer.lua", src = "https://github.com/catgoose/nvim-colorizer.lua",
version = "85a5e83cd4daa258cf95c3204e277991d6fbe747" version = "85a5e83cd4daa258cf95c3204e277991d6fbe747"
@@ -71,7 +100,6 @@ vim.pack.add(
{src = "https://github.com/lewis6991/gitsigns.nvim"}, {src = "https://github.com/lewis6991/gitsigns.nvim"},
{src = "https://github.com/mfussenegger/nvim-dap"}, {src = "https://github.com/mfussenegger/nvim-dap"},
{src = "https://github.com/mhartington/formatter.nvim"}, {src = "https://github.com/mhartington/formatter.nvim"},
{src = "https://github.com/nvim-lua/plenary.nvim"},
{src = "https://github.com/nvim-mini/mini.nvim"}, {src = "https://github.com/nvim-mini/mini.nvim"},
{src = "https://github.com/nvim-neotest/nvim-nio"}, {src = "https://github.com/nvim-neotest/nvim-nio"},
{src = "https://github.com/nvim-telescope/telescope-ui-select.nvim"}, {src = "https://github.com/nvim-telescope/telescope-ui-select.nvim"},
@@ -79,90 +107,35 @@ vim.pack.add(
{src = "https://github.com/nvim-treesitter/nvim-treesitter"}, {src = "https://github.com/nvim-treesitter/nvim-treesitter"},
{src = "https://github.com/nvim-treesitter/nvim-treesitter-textobjects"}, {src = "https://github.com/nvim-treesitter/nvim-treesitter-textobjects"},
{src = "https://github.com/rcarriga/nvim-dap-ui"}, {src = "https://github.com/rcarriga/nvim-dap-ui"},
{src = "https://github.com/rktjmp/lush.nvim"},
{src = "https://github.com/rktjmp/shipwright.nvim"}, {src = "https://github.com/rktjmp/shipwright.nvim"},
{src = "https://github.com/sgraves76/cppman.nvim"}, {src = "https://github.com/sgraves76/cppman.nvim"},
{src = "https://github.com/stevearc/dressing.nvim"}, {src = "https://github.com/stevearc/dressing.nvim"},
{src = "https://github.com/ten3roberts/window-picker.nvim"}, {src = "https://github.com/ten3roberts/window-picker.nvim"},
{src = "https://github.com/tpope/vim-dispatch"}, {src = "https://github.com/tpope/vim-dispatch"},
{src = "https://github.com/tpope/vim-fugitive"} {src = "https://github.com/tpope/vim-fugitive"}
}, }
{confirm = false}
) )
if NV_DARCULA_ENABLE_COC then vim.pack.add(packages, {confirm = false})
vim.pack.add(
{ local theme_set = false
{src = "https://github.com/fannheyward/telescope-coc.nvim"}, local set_colorscheme = function()
{src = "https://github.com/neoclide/coc.nvim", {version = "release"}}, if theme_set then
{src = "https://github.com/honza/vim-snippets"} return
},
{confirm = false}
)
else
vim.pack.add(
{
{src = "https://github.com/WhoIsSethDaniel/mason-tool-installer.nvim"},
{src = "https://github.com/akinsho/flutter-tools.nvim"},
{src = "https://github.com/kosayoda/nvim-lightbulb"},
{src = "https://github.com/mason-org/mason-lspconfig.nvim"},
{src = "https://github.com/mason-org/mason.nvim"},
{src = "https://github.com/neovim/nvim-lspconfig"}
},
{confirm = false}
)
end end
vim.cmd("packadd! plenary.nvim")
vim.cmd("packadd! lush.nvim")
vim.cmd("packadd! darcula_lush")
vim.cmd("colorscheme " .. NV_DARCULA_COLOR_SCHEME) vim.cmd("colorscheme " .. NV_DARCULA_COLOR_SCHEME)
theme_set = true
if NV_DARCULA_ENABLE_COC then
vim.cmd("packadd! coc.nvim")
else
vim.cmd("packadd! nvim-lspconfig")
end end
vim.cmd("packadd! cppman.nvim") for _, pkg in ipairs(packages) do
if NV_DARCULA_ENABLE_COC then local parts = vim.split(pkg.src, "/", {plain = true})
vim.cmd("packadd! dart-vim-plugin") local name = parts[#parts]
vim.cmd("packadd! " .. name)
if name == NV_DARCULA_COLOR_SCHEME then
set_colorscheme()
end end
vim.cmd("packadd! dressing.nvim")
if not NV_DARCULA_ENABLE_COC then
vim.cmd("packadd! flutter-tools.nvim")
end end
vim.cmd("packadd! formatter.nvim")
vim.cmd("packadd! gitsigns.nvim") set_colorscheme()
if not NV_DARCULA_ENABLE_COC then
vim.cmd("packadd! mason-lspconfig.nvim")
end
if not NV_DARCULA_ENABLE_COC then
vim.cmd("packadd! mason.nvim")
end
vim.cmd("packadd! mini.nvim")
vim.cmd("packadd! nvim-colorizer.lua")
vim.cmd("packadd! nvim-dap")
vim.cmd("packadd! nvim-dap-go")
vim.cmd("packadd! nvim-dap-ui")
if not NV_DARCULA_ENABLE_COC then
vim.cmd("packadd! nvim-lightbulb")
end
vim.cmd("packadd! nvim-nio")
vim.cmd("packadd! nvim-scrollview")
vim.cmd("packadd! nvim-tree.lua")
vim.cmd("packadd! nvim-treesitter")
vim.cmd("packadd! nvim-treesitter-textobjects")
vim.cmd("packadd! shipwright.nvim")
if NV_DARCULA_ENABLE_COC then
vim.cmd("packadd! telescope-coc.nvim")
end
vim.cmd("packadd! telescope-ui-select.nvim")
vim.cmd("packadd! telescope.nvim")
vim.cmd("packadd! vim-dispatch")
vim.cmd("packadd! vim-fugitive")
if NV_DARCULA_ENABLE_COC then
vim.cmd("packadd! vim-snippets")
end
vim.cmd("packadd! window-picker.nvim")

View File

@@ -22,6 +22,8 @@ if NV_DARCULA_ENABLE_COC then
end end
local symbols = require("darcula.utils.symbols") local symbols = require("darcula.utils.symbols")
---@diagnostic disable-next-line: deprecated
local unpacker = table.unpack or unpack
require("mason").setup { require("mason").setup {
ui = { ui = {
@@ -58,7 +60,7 @@ for _, name in pairs(NV_DARCULA_MASON_LSP_LIST) do
{ {
cmd = { cmd = {
"clangd", "clangd",
table.unpack(NV_DARCULA_CLANGD_ARGS) unpacker(NV_DARCULA_CLANGD_ARGS)
} }
} }
) )