2022-10-03 04:30:38 +02:00
|
|
|
-- local require = require("lvim.utils.require").require
|
2022-03-24 16:16:38 +01:00
|
|
|
local core_plugins = {
|
2023-01-10 21:18:17 +01:00
|
|
|
{ "folke/lazy.nvim", tag = "stable" },
|
2021-11-16 15:55:45 +01:00
|
|
|
{
|
2023-01-10 21:18:17 +01:00
|
|
|
"neovim/nvim-lspconfig",
|
|
|
|
lazy = true,
|
|
|
|
dependencies = { "mason-lspconfig.nvim", "nlsp-settings.nvim" },
|
2021-11-16 15:55:45 +01:00
|
|
|
},
|
2023-02-04 16:22:41 +01:00
|
|
|
{
|
|
|
|
"williamboman/mason-lspconfig.nvim",
|
|
|
|
cmd = { "LspInstall", "LspUninstall" },
|
2023-02-07 17:30:14 +01:00
|
|
|
config = function()
|
|
|
|
require("mason-lspconfig").setup(lvim.lsp.installer.setup)
|
|
|
|
|
|
|
|
-- automatic_installation is handled by lsp-manager
|
|
|
|
local settings = require "mason-lspconfig.settings"
|
|
|
|
settings.current.automatic_installation = false
|
|
|
|
end,
|
2023-02-04 16:22:41 +01:00
|
|
|
lazy = true,
|
2023-05-02 09:57:39 +02:00
|
|
|
event = "User FileOpened",
|
2023-02-04 16:22:41 +01:00
|
|
|
dependencies = "mason.nvim",
|
|
|
|
},
|
|
|
|
{ "tamago324/nlsp-settings.nvim", cmd = "LspSettings", lazy = true },
|
2023-01-10 21:18:17 +01:00
|
|
|
{ "jose-elias-alvarez/null-ls.nvim", lazy = true },
|
2021-07-18 20:08:14 +02:00
|
|
|
{
|
2022-08-09 10:41:17 +02:00
|
|
|
"williamboman/mason.nvim",
|
|
|
|
config = function()
|
2022-10-03 04:30:38 +02:00
|
|
|
require("lvim.core.mason").setup()
|
2022-08-09 10:41:17 +02:00
|
|
|
end,
|
2023-02-04 16:22:41 +01:00
|
|
|
cmd = { "Mason", "MasonInstall", "MasonUninstall", "MasonUninstallAll", "MasonLog" },
|
2023-04-04 10:10:36 +02:00
|
|
|
build = function()
|
|
|
|
pcall(function()
|
|
|
|
require("mason-registry").refresh()
|
|
|
|
end)
|
|
|
|
end,
|
2023-05-02 09:57:39 +02:00
|
|
|
event = "User FileOpened",
|
2023-02-04 16:22:41 +01:00
|
|
|
lazy = true,
|
2021-07-18 20:08:14 +02:00
|
|
|
},
|
2022-03-19 13:55:34 +01:00
|
|
|
{
|
2022-09-20 11:41:58 +02:00
|
|
|
"folke/tokyonight.nvim",
|
2023-02-04 16:22:41 +01:00
|
|
|
lazy = not vim.startswith(lvim.colorscheme, "tokyonight"),
|
2022-03-19 13:55:34 +01:00
|
|
|
},
|
2022-11-04 17:57:24 +01:00
|
|
|
{
|
|
|
|
"lunarvim/lunar.nvim",
|
2023-02-04 16:22:41 +01:00
|
|
|
lazy = lvim.colorscheme ~= "lunar",
|
2022-11-04 17:57:24 +01:00
|
|
|
},
|
2023-02-04 16:22:41 +01:00
|
|
|
{ "Tastyep/structlog.nvim", lazy = true },
|
|
|
|
{ "nvim-lua/plenary.nvim", cmd = { "PlenaryBustedFile", "PlenaryBustedDirectory" }, lazy = true },
|
2021-07-10 09:19:44 +02:00
|
|
|
-- Telescope
|
2021-07-18 20:08:14 +02:00
|
|
|
{
|
2021-07-07 05:22:46 +02:00
|
|
|
"nvim-telescope/telescope.nvim",
|
2022-07-23 14:16:43 +02:00
|
|
|
branch = "0.1.x",
|
2021-07-20 23:28:29 +02:00
|
|
|
config = function()
|
2022-10-03 04:30:38 +02:00
|
|
|
require("lvim.core.telescope").setup()
|
2021-07-20 23:28:29 +02:00
|
|
|
end,
|
2023-01-10 21:18:17 +01:00
|
|
|
dependencies = { "telescope-fzf-native.nvim" },
|
|
|
|
lazy = true,
|
|
|
|
cmd = "Telescope",
|
|
|
|
enabled = lvim.builtin.telescope.active,
|
2021-10-15 16:33:34 +02:00
|
|
|
},
|
2023-01-10 21:18:17 +01:00
|
|
|
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make", lazy = true, enabled = lvim.builtin.telescope.active },
|
2021-09-08 01:23:14 +02:00
|
|
|
-- Install nvim-cmp, and buffer source as a dependency
|
2021-07-18 20:08:14 +02:00
|
|
|
{
|
2021-09-08 01:23:14 +02:00
|
|
|
"hrsh7th/nvim-cmp",
|
2021-07-07 05:22:46 +02:00
|
|
|
config = function()
|
2021-11-28 16:52:56 +01:00
|
|
|
if lvim.builtin.cmp then
|
2022-10-03 04:30:38 +02:00
|
|
|
require("lvim.core.cmp").setup()
|
2021-09-13 07:47:25 +02:00
|
|
|
end
|
|
|
|
end,
|
2023-01-10 21:18:17 +01:00
|
|
|
event = { "InsertEnter", "CmdlineEnter" },
|
|
|
|
dependencies = {
|
|
|
|
"cmp-nvim-lsp",
|
|
|
|
"cmp_luasnip",
|
|
|
|
"cmp-buffer",
|
|
|
|
"cmp-path",
|
2023-01-13 11:22:52 +01:00
|
|
|
"cmp-cmdline",
|
2021-11-28 16:52:56 +01:00
|
|
|
},
|
2021-07-28 06:02:40 +02:00
|
|
|
},
|
2023-01-10 21:18:17 +01:00
|
|
|
{ "hrsh7th/cmp-nvim-lsp", lazy = true },
|
|
|
|
{ "saadparwaiz1/cmp_luasnip", lazy = true },
|
|
|
|
{ "hrsh7th/cmp-buffer", lazy = true },
|
|
|
|
{ "hrsh7th/cmp-path", lazy = true },
|
2023-01-13 11:22:52 +01:00
|
|
|
{
|
|
|
|
"hrsh7th/cmp-cmdline",
|
|
|
|
lazy = true,
|
|
|
|
enabled = lvim.builtin.cmp and lvim.builtin.cmp.cmdline.enable or false,
|
|
|
|
},
|
2021-11-06 19:19:35 +01:00
|
|
|
{
|
|
|
|
"L3MON4D3/LuaSnip",
|
2021-11-28 16:52:56 +01:00
|
|
|
config = function()
|
2022-10-03 04:30:38 +02:00
|
|
|
local utils = require "lvim.utils"
|
2022-05-26 16:06:49 +02:00
|
|
|
local paths = {}
|
|
|
|
if lvim.builtin.luasnip.sources.friendly_snippets then
|
2023-01-10 21:18:17 +01:00
|
|
|
paths[#paths + 1] = utils.join_paths(get_runtime_dir(), "site", "pack", "lazy", "opt", "friendly-snippets")
|
2022-05-26 16:06:49 +02:00
|
|
|
end
|
2022-04-18 11:30:18 +02:00
|
|
|
local user_snippets = utils.join_paths(get_config_dir(), "snippets")
|
|
|
|
if utils.is_directory(user_snippets) then
|
|
|
|
paths[#paths + 1] = user_snippets
|
|
|
|
end
|
2022-10-03 04:30:38 +02:00
|
|
|
require("luasnip.loaders.from_lua").lazy_load()
|
|
|
|
require("luasnip.loaders.from_vscode").lazy_load {
|
2022-04-18 11:30:18 +02:00
|
|
|
paths = paths,
|
2022-04-11 15:47:08 +02:00
|
|
|
}
|
2022-10-03 04:30:38 +02:00
|
|
|
require("luasnip.loaders.from_snipmate").lazy_load()
|
2021-11-28 16:52:56 +01:00
|
|
|
end,
|
2023-01-10 21:18:17 +01:00
|
|
|
event = "InsertEnter",
|
|
|
|
dependencies = {
|
|
|
|
"friendly-snippets",
|
|
|
|
},
|
2021-11-06 19:19:35 +01:00
|
|
|
},
|
2023-01-10 21:18:17 +01:00
|
|
|
{ "rafamadriz/friendly-snippets", lazy = true, cond = lvim.builtin.luasnip.sources.friendly_snippets },
|
2021-11-06 19:19:35 +01:00
|
|
|
{
|
2022-10-15 08:51:24 +02:00
|
|
|
"folke/neodev.nvim",
|
2023-01-10 21:18:17 +01:00
|
|
|
lazy = true,
|
2021-11-06 19:19:35 +01:00
|
|
|
},
|
2021-07-07 05:22:46 +02:00
|
|
|
|
2021-07-10 16:51:53 +02:00
|
|
|
-- Autopairs
|
2021-07-18 20:08:14 +02:00
|
|
|
{
|
2021-07-10 16:51:53 +02:00
|
|
|
"windwp/nvim-autopairs",
|
2023-01-10 21:18:17 +01:00
|
|
|
event = "InsertEnter",
|
2021-07-10 16:51:53 +02:00
|
|
|
config = function()
|
2022-10-03 04:30:38 +02:00
|
|
|
require("lvim.core.autopairs").setup()
|
2021-07-10 16:51:53 +02:00
|
|
|
end,
|
2023-01-10 21:18:17 +01:00
|
|
|
enabled = lvim.builtin.autopairs.active,
|
2023-02-16 16:51:35 +01:00
|
|
|
dependencies = { "nvim-treesitter/nvim-treesitter", "hrsh7th/nvim-cmp" },
|
2021-07-18 20:08:14 +02:00
|
|
|
},
|
2021-07-10 16:51:53 +02:00
|
|
|
|
2021-07-07 05:22:46 +02:00
|
|
|
-- Treesitter
|
2021-07-18 20:08:14 +02:00
|
|
|
{
|
2021-07-13 03:11:43 +02:00
|
|
|
"nvim-treesitter/nvim-treesitter",
|
2021-07-26 06:34:40 +02:00
|
|
|
-- run = ":TSUpdate",
|
2021-07-13 03:11:43 +02:00
|
|
|
config = function()
|
2023-01-11 16:35:27 +01:00
|
|
|
local utils = require "lvim.utils"
|
|
|
|
local path = utils.join_paths(get_runtime_dir(), "site", "pack", "lazy", "opt", "nvim-treesitter")
|
|
|
|
vim.opt.rtp:prepend(path) -- treesitter needs to be before nvim's runtime in rtp
|
2022-10-03 04:30:38 +02:00
|
|
|
require("lvim.core.treesitter").setup()
|
2021-07-17 00:36:43 +02:00
|
|
|
end,
|
2023-02-07 17:30:14 +01:00
|
|
|
cmd = {
|
|
|
|
"TSInstall",
|
|
|
|
"TSUninstall",
|
|
|
|
"TSUpdate",
|
|
|
|
"TSUpdateSync",
|
|
|
|
"TSInstallInfo",
|
|
|
|
"TSInstallSync",
|
|
|
|
"TSInstallFromGrammar",
|
|
|
|
},
|
2023-02-04 16:22:41 +01:00
|
|
|
event = "User FileOpened",
|
2021-07-18 20:08:14 +02:00
|
|
|
},
|
2021-11-05 23:15:10 +01:00
|
|
|
{
|
2023-02-04 16:22:41 +01:00
|
|
|
-- Lazy loaded by Comment.nvim pre_hook
|
2021-11-05 23:15:10 +01:00
|
|
|
"JoosepAlviste/nvim-ts-context-commentstring",
|
2023-02-04 16:22:41 +01:00
|
|
|
lazy = true,
|
2021-11-05 23:15:10 +01:00
|
|
|
},
|
2021-07-17 00:30:38 +02:00
|
|
|
|
2021-07-10 09:19:44 +02:00
|
|
|
-- NvimTree
|
2021-07-18 20:08:14 +02:00
|
|
|
{
|
2023-08-18 14:01:11 +02:00
|
|
|
"nvim-tree/nvim-tree.lua",
|
2021-07-07 05:22:46 +02:00
|
|
|
config = function()
|
2022-10-03 04:30:38 +02:00
|
|
|
require("lvim.core.nvimtree").setup()
|
2021-07-07 05:22:46 +02:00
|
|
|
end,
|
2023-01-10 21:18:17 +01:00
|
|
|
enabled = lvim.builtin.nvimtree.active,
|
2023-02-04 16:22:41 +01:00
|
|
|
cmd = { "NvimTreeToggle", "NvimTreeOpen", "NvimTreeFocus", "NvimTreeFindFileToggle" },
|
|
|
|
event = "User DirOpened",
|
2021-07-18 20:08:14 +02:00
|
|
|
},
|
2022-09-19 17:44:04 +02:00
|
|
|
-- Lir
|
|
|
|
{
|
2023-01-12 08:59:00 +01:00
|
|
|
"tamago324/lir.nvim",
|
2022-09-19 17:44:04 +02:00
|
|
|
config = function()
|
2022-10-03 04:30:38 +02:00
|
|
|
require("lvim.core.lir").setup()
|
2022-09-19 17:44:04 +02:00
|
|
|
end,
|
2023-01-10 21:18:17 +01:00
|
|
|
enabled = lvim.builtin.lir.active,
|
2023-02-04 16:22:41 +01:00
|
|
|
event = "User DirOpened",
|
2022-09-19 17:44:04 +02:00
|
|
|
},
|
2021-07-18 20:08:14 +02:00
|
|
|
{
|
2021-07-07 05:22:46 +02:00
|
|
|
"lewis6991/gitsigns.nvim",
|
|
|
|
config = function()
|
2022-10-03 04:30:38 +02:00
|
|
|
require("lvim.core.gitsigns").setup()
|
2021-07-07 05:22:46 +02:00
|
|
|
end,
|
2023-02-04 16:22:41 +01:00
|
|
|
event = "User FileOpened",
|
|
|
|
cmd = "Gitsigns",
|
2023-01-10 21:18:17 +01:00
|
|
|
enabled = lvim.builtin.gitsigns.active,
|
2021-07-18 20:08:14 +02:00
|
|
|
},
|
2021-07-07 05:22:46 +02:00
|
|
|
|
2021-07-25 03:17:11 +02:00
|
|
|
-- Whichkey
|
2021-07-18 20:08:14 +02:00
|
|
|
{
|
2022-09-07 09:08:46 +02:00
|
|
|
"folke/which-key.nvim",
|
2021-07-08 01:27:27 +02:00
|
|
|
config = function()
|
2022-10-03 04:30:38 +02:00
|
|
|
require("lvim.core.which-key").setup()
|
2021-07-08 01:27:27 +02:00
|
|
|
end,
|
2023-02-04 16:22:41 +01:00
|
|
|
cmd = "WhichKey",
|
2023-01-10 21:18:17 +01:00
|
|
|
event = "VeryLazy",
|
|
|
|
enabled = lvim.builtin.which_key.active,
|
2021-07-18 20:08:14 +02:00
|
|
|
},
|
2021-07-07 05:22:46 +02:00
|
|
|
|
|
|
|
-- Comments
|
2021-07-18 20:08:14 +02:00
|
|
|
{
|
2021-10-11 18:40:59 +02:00
|
|
|
"numToStr/Comment.nvim",
|
2021-07-07 05:22:46 +02:00
|
|
|
config = function()
|
2022-10-03 04:30:38 +02:00
|
|
|
require("lvim.core.comment").setup()
|
2021-07-07 05:22:46 +02:00
|
|
|
end,
|
2023-02-04 16:22:41 +01:00
|
|
|
keys = { { "gc", mode = { "n", "v" } }, { "gb", mode = { "n", "v" } } },
|
|
|
|
event = "User FileOpened",
|
2023-01-10 21:18:17 +01:00
|
|
|
enabled = lvim.builtin.comment.active,
|
2021-07-18 20:08:14 +02:00
|
|
|
},
|
2021-07-07 05:22:46 +02:00
|
|
|
|
2021-08-18 07:34:26 +02:00
|
|
|
-- project.nvim
|
2021-07-18 20:08:14 +02:00
|
|
|
{
|
2021-08-18 07:34:26 +02:00
|
|
|
"ahmedkhalf/project.nvim",
|
2021-07-12 17:58:30 +02:00
|
|
|
config = function()
|
2022-10-03 04:30:38 +02:00
|
|
|
require("lvim.core.project").setup()
|
2021-07-12 17:58:30 +02:00
|
|
|
end,
|
2023-01-10 21:18:17 +01:00
|
|
|
enabled = lvim.builtin.project.active,
|
2023-02-04 16:22:41 +01:00
|
|
|
event = "VimEnter",
|
|
|
|
cmd = "Telescope projects",
|
2021-07-18 20:08:14 +02:00
|
|
|
},
|
2021-07-12 17:58:30 +02:00
|
|
|
|
2021-07-07 05:22:46 +02:00
|
|
|
-- Icons
|
2022-04-28 16:30:39 +02:00
|
|
|
{
|
2023-01-15 09:46:16 +01:00
|
|
|
"nvim-tree/nvim-web-devicons",
|
2023-01-10 21:18:17 +01:00
|
|
|
enabled = lvim.use_icons,
|
2023-02-04 16:22:41 +01:00
|
|
|
lazy = true,
|
2022-04-28 16:30:39 +02:00
|
|
|
},
|
2021-07-07 05:22:46 +02:00
|
|
|
|
|
|
|
-- Status Line and Bufferline
|
2021-07-18 20:08:14 +02:00
|
|
|
{
|
2021-08-20 11:16:29 +02:00
|
|
|
-- "hoob3rt/lualine.nvim",
|
2021-10-22 10:39:01 +02:00
|
|
|
"nvim-lualine/lualine.nvim",
|
2021-08-20 11:16:29 +02:00
|
|
|
-- "Lunarvim/lualine.nvim",
|
2021-07-08 03:57:36 +02:00
|
|
|
config = function()
|
2022-10-03 04:30:38 +02:00
|
|
|
require("lvim.core.lualine").setup()
|
2021-07-08 03:57:36 +02:00
|
|
|
end,
|
2023-02-04 16:22:41 +01:00
|
|
|
event = "VimEnter",
|
2023-01-10 21:18:17 +01:00
|
|
|
enabled = lvim.builtin.lualine.active,
|
2021-07-18 20:08:14 +02:00
|
|
|
},
|
2021-07-07 05:22:46 +02:00
|
|
|
|
2022-09-20 04:14:32 +02:00
|
|
|
-- breadcrumbs
|
|
|
|
{
|
|
|
|
"SmiteshP/nvim-navic",
|
|
|
|
config = function()
|
2022-10-03 04:30:38 +02:00
|
|
|
require("lvim.core.breadcrumbs").setup()
|
2022-09-20 04:14:32 +02:00
|
|
|
end,
|
2023-02-04 16:22:41 +01:00
|
|
|
event = "User FileOpened",
|
2023-01-10 21:18:17 +01:00
|
|
|
enabled = lvim.builtin.breadcrumbs.active,
|
2022-09-20 04:14:32 +02:00
|
|
|
},
|
|
|
|
|
2021-07-18 20:08:14 +02:00
|
|
|
{
|
2022-02-07 18:22:30 +01:00
|
|
|
"akinsho/bufferline.nvim",
|
2021-07-07 05:22:46 +02:00
|
|
|
config = function()
|
2022-10-03 04:30:38 +02:00
|
|
|
require("lvim.core.bufferline").setup()
|
2021-07-07 05:22:46 +02:00
|
|
|
end,
|
2022-04-12 11:18:17 +02:00
|
|
|
branch = "main",
|
2023-02-04 16:22:41 +01:00
|
|
|
event = "User FileOpened",
|
2023-01-10 21:18:17 +01:00
|
|
|
enabled = lvim.builtin.bufferline.active,
|
2021-07-18 20:08:14 +02:00
|
|
|
},
|
2021-07-07 05:22:46 +02:00
|
|
|
|
2021-07-10 09:19:44 +02:00
|
|
|
-- Debugging
|
2021-07-18 20:08:14 +02:00
|
|
|
{
|
2021-07-10 09:19:44 +02:00
|
|
|
"mfussenegger/nvim-dap",
|
|
|
|
config = function()
|
2022-10-03 04:30:38 +02:00
|
|
|
require("lvim.core.dap").setup()
|
2021-07-10 09:19:44 +02:00
|
|
|
end,
|
2023-02-04 16:22:41 +01:00
|
|
|
lazy = true,
|
2023-05-02 22:46:00 +02:00
|
|
|
dependencies = {
|
|
|
|
"rcarriga/nvim-dap-ui",
|
|
|
|
},
|
2023-01-10 21:18:17 +01:00
|
|
|
enabled = lvim.builtin.dap.active,
|
2021-07-18 20:08:14 +02:00
|
|
|
},
|
2021-07-10 09:19:44 +02:00
|
|
|
|
2022-10-04 07:38:59 +02:00
|
|
|
-- Debugger user interface
|
|
|
|
{
|
|
|
|
"rcarriga/nvim-dap-ui",
|
|
|
|
config = function()
|
|
|
|
require("lvim.core.dap").setup_ui()
|
|
|
|
end,
|
2023-02-04 16:22:41 +01:00
|
|
|
lazy = true,
|
2023-01-10 21:18:17 +01:00
|
|
|
enabled = lvim.builtin.dap.active,
|
2022-10-04 07:38:59 +02:00
|
|
|
},
|
|
|
|
|
2022-03-19 20:02:45 +01:00
|
|
|
-- alpha
|
2021-07-18 20:08:14 +02:00
|
|
|
{
|
2022-03-19 20:02:45 +01:00
|
|
|
"goolord/alpha-nvim",
|
2021-07-10 03:01:23 +02:00
|
|
|
config = function()
|
2022-10-03 04:30:38 +02:00
|
|
|
require("lvim.core.alpha").setup()
|
2021-07-10 03:01:23 +02:00
|
|
|
end,
|
2023-01-10 21:18:17 +01:00
|
|
|
enabled = lvim.builtin.alpha.active,
|
2023-02-04 16:22:41 +01:00
|
|
|
event = "VimEnter",
|
2021-07-18 20:08:14 +02:00
|
|
|
},
|
2021-07-10 01:38:15 +02:00
|
|
|
|
2021-07-25 03:17:11 +02:00
|
|
|
-- Terminal
|
2021-07-18 20:08:14 +02:00
|
|
|
{
|
2021-09-06 16:06:28 +02:00
|
|
|
"akinsho/toggleterm.nvim",
|
2022-04-12 11:18:17 +02:00
|
|
|
branch = "main",
|
2023-02-11 18:43:38 +01:00
|
|
|
init = function()
|
|
|
|
require("lvim.core.terminal").init()
|
|
|
|
end,
|
2021-07-10 09:19:44 +02:00
|
|
|
config = function()
|
2022-10-03 04:30:38 +02:00
|
|
|
require("lvim.core.terminal").setup()
|
2021-07-10 09:19:44 +02:00
|
|
|
end,
|
2023-02-11 18:43:38 +01:00
|
|
|
cmd = {
|
|
|
|
"ToggleTerm",
|
|
|
|
"TermExec",
|
|
|
|
"ToggleTermToggleAll",
|
|
|
|
"ToggleTermSendCurrentLine",
|
|
|
|
"ToggleTermSendVisualLines",
|
|
|
|
"ToggleTermSendVisualSelection",
|
|
|
|
},
|
|
|
|
keys = lvim.builtin.terminal.open_mapping,
|
2023-01-10 21:18:17 +01:00
|
|
|
enabled = lvim.builtin.terminal.active,
|
2021-07-18 20:08:14 +02:00
|
|
|
},
|
2022-02-03 08:55:25 +01:00
|
|
|
|
|
|
|
-- SchemaStore
|
|
|
|
{
|
|
|
|
"b0o/schemastore.nvim",
|
2023-01-10 21:18:17 +01:00
|
|
|
lazy = true,
|
2022-02-03 08:55:25 +01:00
|
|
|
},
|
2022-09-19 19:12:52 +02:00
|
|
|
|
|
|
|
{
|
|
|
|
"RRethy/vim-illuminate",
|
2022-09-20 14:11:36 +02:00
|
|
|
config = function()
|
2022-10-03 04:30:38 +02:00
|
|
|
require("lvim.core.illuminate").setup()
|
2022-09-20 11:41:58 +02:00
|
|
|
end,
|
2023-02-04 16:22:41 +01:00
|
|
|
event = "User FileOpened",
|
2023-01-10 21:18:17 +01:00
|
|
|
enabled = lvim.builtin.illuminate.active,
|
2022-09-20 11:41:58 +02:00
|
|
|
},
|
2022-09-21 16:48:15 +02:00
|
|
|
|
|
|
|
{
|
|
|
|
"lukas-reineke/indent-blankline.nvim",
|
|
|
|
config = function()
|
2022-10-03 04:30:38 +02:00
|
|
|
require("lvim.core.indentlines").setup()
|
2022-09-21 16:48:15 +02:00
|
|
|
end,
|
2023-02-04 16:22:41 +01:00
|
|
|
event = "User FileOpened",
|
2023-01-10 21:18:17 +01:00
|
|
|
enabled = lvim.builtin.indentlines.active,
|
2022-09-21 16:48:15 +02:00
|
|
|
},
|
|
|
|
|
2022-09-20 11:41:58 +02:00
|
|
|
{
|
|
|
|
"lunarvim/onedarker.nvim",
|
|
|
|
branch = "freeze",
|
|
|
|
config = function()
|
|
|
|
pcall(function()
|
|
|
|
if lvim and lvim.colorscheme == "onedarker" then
|
2022-10-03 04:30:38 +02:00
|
|
|
require("onedarker").setup()
|
2022-09-20 11:41:58 +02:00
|
|
|
lvim.builtin.lualine.options.theme = "onedarker"
|
|
|
|
end
|
|
|
|
end)
|
|
|
|
end,
|
2023-02-04 16:22:41 +01:00
|
|
|
lazy = lvim.colorscheme ~= "onedarker",
|
2022-09-19 19:12:52 +02:00
|
|
|
},
|
2022-11-28 19:11:06 +01:00
|
|
|
|
|
|
|
{
|
|
|
|
"lunarvim/bigfile.nvim",
|
|
|
|
config = function()
|
|
|
|
pcall(function()
|
|
|
|
require("bigfile").config(lvim.builtin.bigfile.config)
|
|
|
|
end)
|
|
|
|
end,
|
2023-01-10 21:18:17 +01:00
|
|
|
enabled = lvim.builtin.bigfile.active,
|
2023-02-04 16:22:41 +01:00
|
|
|
event = { "FileReadPre", "BufReadPre", "User FileOpened" },
|
2022-11-28 19:11:06 +01:00
|
|
|
},
|
2021-07-18 20:08:14 +02:00
|
|
|
}
|
2022-03-24 16:16:38 +01:00
|
|
|
|
2022-06-23 16:11:47 +02:00
|
|
|
local default_snapshot_path = join_paths(get_lvim_base_dir(), "snapshots", "default.json")
|
|
|
|
local content = vim.fn.readfile(default_snapshot_path)
|
2023-01-10 21:18:17 +01:00
|
|
|
local default_sha1 = assert(vim.fn.json_decode(content))
|
|
|
|
|
2023-07-13 08:40:05 +02:00
|
|
|
-- taken from <https://github.com/folke/lazy.nvim/blob/c7122d64cdf16766433588486adcee67571de6d0/lua/lazy/core/plugin.lua#L27>
|
2023-01-10 21:18:17 +01:00
|
|
|
local get_short_name = function(long_name)
|
|
|
|
local name = long_name:sub(-4) == ".git" and long_name:sub(1, -5) or long_name
|
|
|
|
local slash = name:reverse():find("/", 1, true) --[[@as number?]]
|
|
|
|
return slash and name:sub(#name - slash + 2) or long_name:gsub("%W+", "_")
|
|
|
|
end
|
2022-06-23 16:11:47 +02:00
|
|
|
|
|
|
|
local get_default_sha1 = function(spec)
|
2023-01-10 21:18:17 +01:00
|
|
|
local short_name = get_short_name(spec[1])
|
2022-06-23 16:11:47 +02:00
|
|
|
return default_sha1[short_name] and default_sha1[short_name].commit
|
|
|
|
end
|
|
|
|
|
2022-10-15 14:06:52 +02:00
|
|
|
if not vim.env.LVIM_DEV_MODE then
|
2023-01-10 21:18:17 +01:00
|
|
|
-- Manually lock the commit hashes of core plugins
|
2022-10-15 14:06:52 +02:00
|
|
|
for _, spec in ipairs(core_plugins) do
|
2022-06-23 16:11:47 +02:00
|
|
|
spec["commit"] = get_default_sha1(spec)
|
2022-03-24 16:16:38 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
return core_plugins
|