|
@@ -1,3 +1,4 @@
|
|
|
|
+local reload = require("lvim.utils.reload").reload
|
|
local core_plugins = {
|
|
local core_plugins = {
|
|
-- Packer can manage itself as an optional plugin
|
|
-- Packer can manage itself as an optional plugin
|
|
{ "wbthomason/packer.nvim" },
|
|
{ "wbthomason/packer.nvim" },
|
|
@@ -10,20 +11,20 @@ local core_plugins = {
|
|
{
|
|
{
|
|
"williamboman/mason.nvim",
|
|
"williamboman/mason.nvim",
|
|
config = function()
|
|
config = function()
|
|
- require("lvim.core.mason").setup()
|
|
|
|
|
|
+ reload("lvim.core.mason").setup()
|
|
end,
|
|
end,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
"folke/tokyonight.nvim",
|
|
"folke/tokyonight.nvim",
|
|
config = function()
|
|
config = function()
|
|
- require("lvim.core.theme").setup()
|
|
|
|
|
|
+ reload("lvim.core.theme").setup()
|
|
end,
|
|
end,
|
|
-- disable = not vim.startswith(lvim.colorscheme, "tokyonight"),
|
|
-- disable = not vim.startswith(lvim.colorscheme, "tokyonight"),
|
|
},
|
|
},
|
|
{
|
|
{
|
|
"rcarriga/nvim-notify",
|
|
"rcarriga/nvim-notify",
|
|
config = function()
|
|
config = function()
|
|
- require("lvim.core.notify").setup()
|
|
|
|
|
|
+ reload("lvim.core.notify").setup()
|
|
end,
|
|
end,
|
|
requires = { "nvim-telescope/telescope.nvim" },
|
|
requires = { "nvim-telescope/telescope.nvim" },
|
|
disable = not lvim.builtin.notify.active or not lvim.builtin.telescope.active,
|
|
disable = not lvim.builtin.notify.active or not lvim.builtin.telescope.active,
|
|
@@ -37,7 +38,7 @@ local core_plugins = {
|
|
"nvim-telescope/telescope.nvim",
|
|
"nvim-telescope/telescope.nvim",
|
|
branch = "0.1.x",
|
|
branch = "0.1.x",
|
|
config = function()
|
|
config = function()
|
|
- require("lvim.core.telescope").setup()
|
|
|
|
|
|
+ reload("lvim.core.telescope").setup()
|
|
end,
|
|
end,
|
|
disable = not lvim.builtin.telescope.active,
|
|
disable = not lvim.builtin.telescope.active,
|
|
},
|
|
},
|
|
@@ -52,7 +53,7 @@ local core_plugins = {
|
|
"hrsh7th/nvim-cmp",
|
|
"hrsh7th/nvim-cmp",
|
|
config = function()
|
|
config = function()
|
|
if lvim.builtin.cmp then
|
|
if lvim.builtin.cmp then
|
|
- require("lvim.core.cmp").setup()
|
|
|
|
|
|
+ reload("lvim.core.cmp").setup()
|
|
end
|
|
end
|
|
end,
|
|
end,
|
|
requires = {
|
|
requires = {
|
|
@@ -66,7 +67,7 @@ local core_plugins = {
|
|
{
|
|
{
|
|
"L3MON4D3/LuaSnip",
|
|
"L3MON4D3/LuaSnip",
|
|
config = function()
|
|
config = function()
|
|
- local utils = require "lvim.utils"
|
|
|
|
|
|
+ local utils = reload "lvim.utils"
|
|
local paths = {}
|
|
local paths = {}
|
|
if lvim.builtin.luasnip.sources.friendly_snippets then
|
|
if lvim.builtin.luasnip.sources.friendly_snippets then
|
|
paths[#paths + 1] = utils.join_paths(get_runtime_dir(), "site", "pack", "packer", "start", "friendly-snippets")
|
|
paths[#paths + 1] = utils.join_paths(get_runtime_dir(), "site", "pack", "packer", "start", "friendly-snippets")
|
|
@@ -75,11 +76,11 @@ local core_plugins = {
|
|
if utils.is_directory(user_snippets) then
|
|
if utils.is_directory(user_snippets) then
|
|
paths[#paths + 1] = user_snippets
|
|
paths[#paths + 1] = user_snippets
|
|
end
|
|
end
|
|
- require("luasnip.loaders.from_lua").lazy_load()
|
|
|
|
- require("luasnip.loaders.from_vscode").lazy_load {
|
|
|
|
|
|
+ reload("luasnip.loaders.from_lua").lazy_load()
|
|
|
|
+ reload("luasnip.loaders.from_vscode").lazy_load {
|
|
paths = paths,
|
|
paths = paths,
|
|
}
|
|
}
|
|
- require("luasnip.loaders.from_snipmate").lazy_load()
|
|
|
|
|
|
+ reload("luasnip.loaders.from_snipmate").lazy_load()
|
|
end,
|
|
end,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -104,7 +105,7 @@ local core_plugins = {
|
|
"windwp/nvim-autopairs",
|
|
"windwp/nvim-autopairs",
|
|
-- event = "InsertEnter",
|
|
-- event = "InsertEnter",
|
|
config = function()
|
|
config = function()
|
|
- require("lvim.core.autopairs").setup()
|
|
|
|
|
|
+ reload("lvim.core.autopairs").setup()
|
|
end,
|
|
end,
|
|
disable = not lvim.builtin.autopairs.active,
|
|
disable = not lvim.builtin.autopairs.active,
|
|
},
|
|
},
|
|
@@ -114,7 +115,7 @@ local core_plugins = {
|
|
"nvim-treesitter/nvim-treesitter",
|
|
"nvim-treesitter/nvim-treesitter",
|
|
-- run = ":TSUpdate",
|
|
-- run = ":TSUpdate",
|
|
config = function()
|
|
config = function()
|
|
- require("lvim.core.treesitter").setup()
|
|
|
|
|
|
+ reload("lvim.core.treesitter").setup()
|
|
end,
|
|
end,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -128,7 +129,7 @@ local core_plugins = {
|
|
-- event = "BufWinOpen",
|
|
-- event = "BufWinOpen",
|
|
-- cmd = "NvimTreeToggle",
|
|
-- cmd = "NvimTreeToggle",
|
|
config = function()
|
|
config = function()
|
|
- require("lvim.core.nvimtree").setup()
|
|
|
|
|
|
+ reload("lvim.core.nvimtree").setup()
|
|
end,
|
|
end,
|
|
disable = not lvim.builtin.nvimtree.active,
|
|
disable = not lvim.builtin.nvimtree.active,
|
|
},
|
|
},
|
|
@@ -136,7 +137,7 @@ local core_plugins = {
|
|
{
|
|
{
|
|
"christianchiarulli/lir.nvim",
|
|
"christianchiarulli/lir.nvim",
|
|
config = function()
|
|
config = function()
|
|
- require("lvim.core.lir").setup()
|
|
|
|
|
|
+ reload("lvim.core.lir").setup()
|
|
end,
|
|
end,
|
|
disable = not lvim.builtin.lir.active,
|
|
disable = not lvim.builtin.lir.active,
|
|
},
|
|
},
|
|
@@ -144,7 +145,7 @@ local core_plugins = {
|
|
"lewis6991/gitsigns.nvim",
|
|
"lewis6991/gitsigns.nvim",
|
|
|
|
|
|
config = function()
|
|
config = function()
|
|
- require("lvim.core.gitsigns").setup()
|
|
|
|
|
|
+ reload("lvim.core.gitsigns").setup()
|
|
end,
|
|
end,
|
|
event = "BufRead",
|
|
event = "BufRead",
|
|
disable = not lvim.builtin.gitsigns.active,
|
|
disable = not lvim.builtin.gitsigns.active,
|
|
@@ -154,7 +155,7 @@ local core_plugins = {
|
|
{
|
|
{
|
|
"folke/which-key.nvim",
|
|
"folke/which-key.nvim",
|
|
config = function()
|
|
config = function()
|
|
- require("lvim.core.which-key").setup()
|
|
|
|
|
|
+ reload("lvim.core.which-key").setup()
|
|
end,
|
|
end,
|
|
event = "BufWinEnter",
|
|
event = "BufWinEnter",
|
|
disable = not lvim.builtin.which_key.active,
|
|
disable = not lvim.builtin.which_key.active,
|
|
@@ -165,7 +166,7 @@ local core_plugins = {
|
|
"numToStr/Comment.nvim",
|
|
"numToStr/Comment.nvim",
|
|
event = "BufRead",
|
|
event = "BufRead",
|
|
config = function()
|
|
config = function()
|
|
- require("lvim.core.comment").setup()
|
|
|
|
|
|
+ reload("lvim.core.comment").setup()
|
|
end,
|
|
end,
|
|
disable = not lvim.builtin.comment.active,
|
|
disable = not lvim.builtin.comment.active,
|
|
},
|
|
},
|
|
@@ -174,7 +175,7 @@ local core_plugins = {
|
|
{
|
|
{
|
|
"ahmedkhalf/project.nvim",
|
|
"ahmedkhalf/project.nvim",
|
|
config = function()
|
|
config = function()
|
|
- require("lvim.core.project").setup()
|
|
|
|
|
|
+ reload("lvim.core.project").setup()
|
|
end,
|
|
end,
|
|
disable = not lvim.builtin.project.active,
|
|
disable = not lvim.builtin.project.active,
|
|
},
|
|
},
|
|
@@ -191,7 +192,7 @@ local core_plugins = {
|
|
"nvim-lualine/lualine.nvim",
|
|
"nvim-lualine/lualine.nvim",
|
|
-- "Lunarvim/lualine.nvim",
|
|
-- "Lunarvim/lualine.nvim",
|
|
config = function()
|
|
config = function()
|
|
- require("lvim.core.lualine").setup()
|
|
|
|
|
|
+ reload("lvim.core.lualine").setup()
|
|
end,
|
|
end,
|
|
disable = not lvim.builtin.lualine.active,
|
|
disable = not lvim.builtin.lualine.active,
|
|
},
|
|
},
|
|
@@ -200,7 +201,7 @@ local core_plugins = {
|
|
{
|
|
{
|
|
"SmiteshP/nvim-navic",
|
|
"SmiteshP/nvim-navic",
|
|
config = function()
|
|
config = function()
|
|
- require("lvim.core.breadcrumbs").setup()
|
|
|
|
|
|
+ reload("lvim.core.breadcrumbs").setup()
|
|
end,
|
|
end,
|
|
disable = not lvim.builtin.breadcrumbs.active,
|
|
disable = not lvim.builtin.breadcrumbs.active,
|
|
},
|
|
},
|
|
@@ -208,7 +209,7 @@ local core_plugins = {
|
|
{
|
|
{
|
|
"akinsho/bufferline.nvim",
|
|
"akinsho/bufferline.nvim",
|
|
config = function()
|
|
config = function()
|
|
- require("lvim.core.bufferline").setup()
|
|
|
|
|
|
+ reload("lvim.core.bufferline").setup()
|
|
end,
|
|
end,
|
|
branch = "main",
|
|
branch = "main",
|
|
event = "BufWinEnter",
|
|
event = "BufWinEnter",
|
|
@@ -220,7 +221,7 @@ local core_plugins = {
|
|
"mfussenegger/nvim-dap",
|
|
"mfussenegger/nvim-dap",
|
|
-- event = "BufWinEnter",
|
|
-- event = "BufWinEnter",
|
|
config = function()
|
|
config = function()
|
|
- require("lvim.core.dap").setup()
|
|
|
|
|
|
+ reload("lvim.core.dap").setup()
|
|
end,
|
|
end,
|
|
disable = not lvim.builtin.dap.active,
|
|
disable = not lvim.builtin.dap.active,
|
|
},
|
|
},
|
|
@@ -238,7 +239,7 @@ local core_plugins = {
|
|
{
|
|
{
|
|
"goolord/alpha-nvim",
|
|
"goolord/alpha-nvim",
|
|
config = function()
|
|
config = function()
|
|
- require("lvim.core.alpha").setup()
|
|
|
|
|
|
+ reload("lvim.core.alpha").setup()
|
|
end,
|
|
end,
|
|
disable = not lvim.builtin.alpha.active,
|
|
disable = not lvim.builtin.alpha.active,
|
|
},
|
|
},
|
|
@@ -249,7 +250,7 @@ local core_plugins = {
|
|
event = "BufWinEnter",
|
|
event = "BufWinEnter",
|
|
branch = "main",
|
|
branch = "main",
|
|
config = function()
|
|
config = function()
|
|
- require("lvim.core.terminal").setup()
|
|
|
|
|
|
+ reload("lvim.core.terminal").setup()
|
|
end,
|
|
end,
|
|
disable = not lvim.builtin.terminal.active,
|
|
disable = not lvim.builtin.terminal.active,
|
|
},
|
|
},
|
|
@@ -262,7 +263,7 @@ local core_plugins = {
|
|
{
|
|
{
|
|
"RRethy/vim-illuminate",
|
|
"RRethy/vim-illuminate",
|
|
config = function()
|
|
config = function()
|
|
- require("lvim.core.illuminate").setup()
|
|
|
|
|
|
+ reload("lvim.core.illuminate").setup()
|
|
end,
|
|
end,
|
|
disable = not lvim.builtin.illuminate.active,
|
|
disable = not lvim.builtin.illuminate.active,
|
|
},
|
|
},
|
|
@@ -270,7 +271,7 @@ local core_plugins = {
|
|
{
|
|
{
|
|
"lukas-reineke/indent-blankline.nvim",
|
|
"lukas-reineke/indent-blankline.nvim",
|
|
config = function()
|
|
config = function()
|
|
- require("lvim.core.indentlines").setup()
|
|
|
|
|
|
+ reload("lvim.core.indentlines").setup()
|
|
end,
|
|
end,
|
|
disable = not lvim.builtin.indentlines.active,
|
|
disable = not lvim.builtin.indentlines.active,
|
|
},
|
|
},
|
|
@@ -281,7 +282,7 @@ local core_plugins = {
|
|
config = function()
|
|
config = function()
|
|
pcall(function()
|
|
pcall(function()
|
|
if lvim and lvim.colorscheme == "onedarker" then
|
|
if lvim and lvim.colorscheme == "onedarker" then
|
|
- require("onedarker").setup()
|
|
|
|
|
|
+ reload("onedarker").setup()
|
|
lvim.builtin.lualine.options.theme = "onedarker"
|
|
lvim.builtin.lualine.options.theme = "onedarker"
|
|
end
|
|
end
|
|
end)
|
|
end)
|
|
@@ -295,7 +296,7 @@ local content = vim.fn.readfile(default_snapshot_path)
|
|
local default_sha1 = vim.fn.json_decode(content)
|
|
local default_sha1 = vim.fn.json_decode(content)
|
|
|
|
|
|
local get_default_sha1 = function(spec)
|
|
local get_default_sha1 = function(spec)
|
|
- local short_name, _ = require("packer.util").get_plugin_short_name(spec)
|
|
|
|
|
|
+ local short_name, _ = reload("packer.util").get_plugin_short_name(spec)
|
|
return default_sha1[short_name] and default_sha1[short_name].commit
|
|
return default_sha1[short_name] and default_sha1[short_name].commit
|
|
end
|
|
end
|
|
|
|
|