diff --git a/nvim/lua/darcula/config/init.lua b/nvim/lua/darcula/config/init.lua index 1ecacf7..4bfb1b9 100644 --- a/nvim/lua/darcula/config/init.lua +++ b/nvim/lua/darcula/config/init.lua @@ -19,6 +19,8 @@ -- local utils = require("darcula.utils") +NV_DARCULA_AUTO_INSTALL_DEPS = + utils.parse_env("NV_DARCULA_AUTO_INSTALL_DEPS", true) NV_DARCULA_COLOR_COLUMN = utils.parse_env("NV_DARCULA_COLOR_COLUMN", "80") NV_DARCULA_COLOR_SCHEME = utils.parse_env("NV_DARCULA_COLOR_SCHEME", "darcula_lush") diff --git a/nvim/lua/darcula/plugins.lua b/nvim/lua/darcula/plugins.lua index 8b2e58f..b429aaf 100644 --- a/nvim/lua/darcula/plugins.lua +++ b/nvim/lua/darcula/plugins.lua @@ -109,7 +109,10 @@ vim.list_extend( {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.nvim"}, - {src = "https://github.com/nvim-treesitter/nvim-treesitter", version="4916d6592ede8c07973490d9322f187e07dfefac"}, + { + src = "https://github.com/nvim-treesitter/nvim-treesitter", + version = "4916d6592ede8c07973490d9322f187e07dfefac" + }, {src = "https://github.com/nvim-treesitter/nvim-treesitter-textobjects"}, {src = "https://github.com/rcarriga/nvim-dap-ui"}, {src = "https://github.com/rktjmp/shipwright.nvim"}, @@ -123,24 +126,4 @@ vim.list_extend( vim.pack.add(packages, {confirm = false}) -local theme_set = false -local set_colorscheme = function() - if theme_set then - return - end - - vim.cmd("colorscheme " .. NV_DARCULA_COLOR_SCHEME) - theme_set = true -end - -for _, pkg in ipairs(packages) do - local parts = vim.split(pkg.src, "/", {plain = true}) - local name = parts[#parts] - vim.cmd("packadd! " .. name) - - if name == NV_DARCULA_COLOR_SCHEME then - set_colorscheme() - end -end - -set_colorscheme() +vim.cmd("colorscheme " .. NV_DARCULA_COLOR_SCHEME) diff --git a/nvim/lua/darcula/setup/050_mason.lua b/nvim/lua/darcula/setup/050_mason.lua index 54a8d8f..35b532b 100644 --- a/nvim/lua/darcula/setup/050_mason.lua +++ b/nvim/lua/darcula/setup/050_mason.lua @@ -43,5 +43,5 @@ installer.setup { ["mason-null-ls"] = false, ["mason-nvim-dap"] = false }, - run_on_start = true + run_on_start = NV_DARCULA_AUTO_INSTALL_DEPS }