2022-03-24 16:16:38 +01:00
|
|
|
local core_plugins = {
|
2021-07-07 05:22:46 +02:00
|
|
|
-- Packer can manage itself as an optional plugin
|
2022-03-24 16:16:38 +01:00
|
|
|
{ "wbthomason/packer.nvim" },
|
|
|
|
{ "neovim/nvim-lspconfig" },
|
|
|
|
{ "tamago324/nlsp-settings.nvim" },
|
2021-11-16 15:55:45 +01:00
|
|
|
{
|
|
|
|
"jose-elias-alvarez/null-ls.nvim",
|
|
|
|
},
|
2022-03-24 16:16:38 +01:00
|
|
|
{ "antoinemadec/FixCursorHold.nvim" }, -- Needed while issue https://github.com/neovim/neovim/issues/12587 is still open
|
2022-08-09 10:41:17 +02:00
|
|
|
{ "williamboman/mason-lspconfig.nvim" },
|
2021-07-18 20:08:14 +02:00
|
|
|
{
|
2022-08-09 10:41:17 +02:00
|
|
|
"williamboman/mason.nvim",
|
|
|
|
config = function()
|
|
|
|
require("lvim.core.mason").setup()
|
|
|
|
end,
|
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",
|
2022-03-19 13:55:34 +01:00
|
|
|
config = function()
|
2022-09-20 11:41:58 +02:00
|
|
|
require("lvim.core.theme").setup()
|
2022-03-19 13:55:34 +01:00
|
|
|
end,
|
2022-09-20 11:41:58 +02:00
|
|
|
disable = not vim.startswith(lvim.colorscheme, "tokyonight"),
|
2022-03-19 13:55:34 +01:00
|
|
|
},
|
2021-10-22 23:46:43 +02:00
|
|
|
{
|
|
|
|
"rcarriga/nvim-notify",
|
2022-01-02 10:25:20 +01:00
|
|
|
config = function()
|
|
|
|
require("lvim.core.notify").setup()
|
|
|
|
end,
|
2022-03-19 13:55:34 +01:00
|
|
|
requires = { "nvim-telescope/telescope.nvim" },
|
|
|
|
disable = not lvim.builtin.notify.active or not lvim.builtin.telescope.active,
|
2021-10-22 23:46:43 +02:00
|
|
|
},
|
2022-03-24 16:16:38 +01:00
|
|
|
{ "Tastyep/structlog.nvim" },
|
2021-07-10 19:27:52 +02:00
|
|
|
|
2022-03-24 16:16:38 +01:00
|
|
|
{ "nvim-lua/popup.nvim" },
|
|
|
|
{ "nvim-lua/plenary.nvim" },
|
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()
|
2021-10-10 21:07:41 +02:00
|
|
|
require("lvim.core.telescope").setup()
|
2021-07-20 23:28:29 +02:00
|
|
|
end,
|
2021-08-17 17:20:18 +02:00
|
|
|
disable = not lvim.builtin.telescope.active,
|
2021-07-18 20:08:14 +02:00
|
|
|
},
|
2021-10-15 16:33:34 +02:00
|
|
|
{
|
|
|
|
"nvim-telescope/telescope-fzf-native.nvim",
|
2022-03-19 13:55:34 +01:00
|
|
|
requires = { "nvim-telescope/telescope.nvim" },
|
2021-10-15 16:33:34 +02:00
|
|
|
run = "make",
|
|
|
|
disable = not 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
|
|
|
|
require("lvim.core.cmp").setup()
|
2021-09-13 07:47:25 +02:00
|
|
|
end
|
|
|
|
end,
|
2021-11-28 16:52:56 +01:00
|
|
|
requires = {
|
|
|
|
"L3MON4D3/LuaSnip",
|
|
|
|
},
|
2021-07-28 06:02:40 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"rafamadriz/friendly-snippets",
|
2022-05-26 16:06:49 +02:00
|
|
|
disable = not lvim.builtin.luasnip.sources.friendly_snippets,
|
2021-07-18 20:08:14 +02:00
|
|
|
},
|
2021-11-06 19:19:35 +01:00
|
|
|
{
|
|
|
|
"L3MON4D3/LuaSnip",
|
2021-11-28 16:52:56 +01:00
|
|
|
config = function()
|
2022-04-11 15:47:08 +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
|
|
|
|
paths[#paths + 1] = utils.join_paths(get_runtime_dir(), "site", "pack", "packer", "start", "friendly-snippets")
|
|
|
|
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-04-11 15:47:08 +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
|
|
|
}
|
|
|
|
require("luasnip.loaders.from_snipmate").lazy_load()
|
2021-11-28 16:52:56 +01:00
|
|
|
end,
|
2021-11-06 19:19:35 +01:00
|
|
|
},
|
2021-11-28 16:52:56 +01:00
|
|
|
{
|
|
|
|
"hrsh7th/cmp-nvim-lsp",
|
|
|
|
},
|
2021-11-06 19:19:35 +01:00
|
|
|
{
|
|
|
|
"saadparwaiz1/cmp_luasnip",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"hrsh7th/cmp-buffer",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"hrsh7th/cmp-path",
|
|
|
|
},
|
|
|
|
{
|
2022-09-07 09:08:46 +02:00
|
|
|
"folke/lua-dev.nvim",
|
2021-12-28 10:02:26 +01:00
|
|
|
module = "lua-dev",
|
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",
|
2021-07-10 22:10:03 +02:00
|
|
|
-- event = "InsertEnter",
|
2021-07-10 16:51:53 +02:00
|
|
|
config = function()
|
2021-10-10 21:07:41 +02:00
|
|
|
require("lvim.core.autopairs").setup()
|
2021-07-10 16:51:53 +02:00
|
|
|
end,
|
2021-09-08 01:23:14 +02:00
|
|
|
disable = not lvim.builtin.autopairs.active,
|
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()
|
2021-10-10 21:07:41 +02:00
|
|
|
require("lvim.core.treesitter").setup()
|
2021-07-17 00:36:43 +02:00
|
|
|
end,
|
2021-07-18 20:08:14 +02:00
|
|
|
},
|
2021-11-05 23:15:10 +01:00
|
|
|
{
|
|
|
|
"JoosepAlviste/nvim-ts-context-commentstring",
|
|
|
|
event = "BufReadPost",
|
|
|
|
},
|
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
|
|
|
{
|
2021-07-07 05:22:46 +02:00
|
|
|
"kyazdani42/nvim-tree.lua",
|
2022-09-16 11:15:18 +02:00
|
|
|
-- event = "BufWinOpen",
|
|
|
|
-- cmd = "NvimTreeToggle",
|
2021-07-07 05:22:46 +02:00
|
|
|
config = function()
|
2021-10-10 21:07:41 +02:00
|
|
|
require("lvim.core.nvimtree").setup()
|
2021-07-07 05:22:46 +02:00
|
|
|
end,
|
2021-08-17 17:20:18 +02:00
|
|
|
disable = not lvim.builtin.nvimtree.active,
|
2021-07-18 20:08:14 +02:00
|
|
|
},
|
2022-09-19 17:44:04 +02:00
|
|
|
-- Lir
|
|
|
|
{
|
|
|
|
"christianchiarulli/lir.nvim",
|
|
|
|
config = function()
|
|
|
|
require("lvim.core.lir").setup()
|
|
|
|
end,
|
|
|
|
disable = not lvim.builtin.lir.active,
|
|
|
|
},
|
2021-07-18 20:08:14 +02:00
|
|
|
{
|
2021-07-07 05:22:46 +02:00
|
|
|
"lewis6991/gitsigns.nvim",
|
|
|
|
|
|
|
|
config = function()
|
2021-10-10 21:07:41 +02:00
|
|
|
require("lvim.core.gitsigns").setup()
|
2021-07-07 05:22:46 +02:00
|
|
|
end,
|
|
|
|
event = "BufRead",
|
2021-08-17 17:20:18 +02:00
|
|
|
disable = not 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()
|
2021-10-10 21:07:41 +02:00
|
|
|
require("lvim.core.which-key").setup()
|
2021-07-08 01:27:27 +02:00
|
|
|
end,
|
|
|
|
event = "BufWinEnter",
|
2021-08-17 17:20:18 +02:00
|
|
|
disable = not 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-10 16:51:53 +02:00
|
|
|
event = "BufRead",
|
2021-07-07 05:22:46 +02:00
|
|
|
config = function()
|
2021-10-10 21:07:41 +02:00
|
|
|
require("lvim.core.comment").setup()
|
2021-07-07 05:22:46 +02:00
|
|
|
end,
|
2021-08-17 17:20:18 +02:00
|
|
|
disable = not 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()
|
2021-10-10 21:07:41 +02:00
|
|
|
require("lvim.core.project").setup()
|
2021-07-12 17:58:30 +02:00
|
|
|
end,
|
2021-08-18 07:34:26 +02:00
|
|
|
disable = not lvim.builtin.project.active,
|
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
|
|
|
{
|
|
|
|
"kyazdani42/nvim-web-devicons",
|
|
|
|
disable = not lvim.use_icons,
|
|
|
|
},
|
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()
|
2021-10-10 21:07:41 +02:00
|
|
|
require("lvim.core.lualine").setup()
|
2021-07-08 03:57:36 +02:00
|
|
|
end,
|
2021-08-20 11:16:29 +02:00
|
|
|
disable = not 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()
|
|
|
|
require("lvim.core.breadcrumbs").setup()
|
|
|
|
end,
|
2022-09-20 11:41:58 +02:00
|
|
|
disable = not 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()
|
2021-10-10 21:07:41 +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",
|
2021-07-08 03:57:36 +02:00
|
|
|
event = "BufWinEnter",
|
2021-08-05 21:50:09 +02:00
|
|
|
disable = not 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",
|
2021-07-10 21:34:59 +02:00
|
|
|
-- event = "BufWinEnter",
|
2021-07-10 09:19:44 +02:00
|
|
|
config = function()
|
2021-10-10 21:07:41 +02:00
|
|
|
require("lvim.core.dap").setup()
|
2021-07-10 09:19:44 +02:00
|
|
|
end,
|
2021-07-25 03:17:11 +02:00
|
|
|
disable = not lvim.builtin.dap.active,
|
2021-07-18 20:08:14 +02:00
|
|
|
},
|
2021-07-10 09:19:44 +02:00
|
|
|
|
|
|
|
-- Debugger management
|
2021-07-18 20:08:14 +02:00
|
|
|
{
|
2022-05-05 16:21:51 +02:00
|
|
|
"Pocco81/dap-buddy.nvim",
|
|
|
|
branch = "dev",
|
2021-07-10 21:34:59 +02:00
|
|
|
-- event = "BufWinEnter",
|
2021-07-10 09:19:44 +02:00
|
|
|
-- event = "BufRead",
|
2021-07-25 03:17:11 +02:00
|
|
|
disable = not lvim.builtin.dap.active,
|
2021-07-18 20:08:14 +02:00
|
|
|
},
|
2021-07-10 09:19:44 +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-03-19 20:02:45 +01:00
|
|
|
require("lvim.core.alpha").setup()
|
2021-07-10 03:01:23 +02:00
|
|
|
end,
|
2022-03-19 20:02:45 +01:00
|
|
|
disable = not lvim.builtin.alpha.active,
|
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",
|
2021-07-10 09:19:44 +02:00
|
|
|
event = "BufWinEnter",
|
2022-04-12 11:18:17 +02:00
|
|
|
branch = "main",
|
2021-07-10 09:19:44 +02:00
|
|
|
config = function()
|
2021-10-10 21:07:41 +02:00
|
|
|
require("lvim.core.terminal").setup()
|
2021-07-10 09:19:44 +02:00
|
|
|
end,
|
2021-07-25 03:17:11 +02:00
|
|
|
disable = not lvim.builtin.terminal.active,
|
2021-07-18 20:08:14 +02:00
|
|
|
},
|
2022-02-03 08:55:25 +01:00
|
|
|
|
|
|
|
-- SchemaStore
|
|
|
|
{
|
|
|
|
"b0o/schemastore.nvim",
|
|
|
|
},
|
2022-09-19 19:12:52 +02:00
|
|
|
|
|
|
|
{
|
|
|
|
"RRethy/vim-illuminate",
|
2022-09-20 14:11:36 +02:00
|
|
|
config = function()
|
2022-09-20 11:41:58 +02:00
|
|
|
require("lvim.core.illuminate").setup()
|
|
|
|
end,
|
2022-09-20 17:26:57 +02:00
|
|
|
disable = not 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()
|
|
|
|
require("lvim.core.indent-blankline").setup()
|
|
|
|
end,
|
|
|
|
disable = not lvim.builtin.indentlines.active,
|
|
|
|
},
|
|
|
|
|
2022-09-20 11:41:58 +02:00
|
|
|
{
|
|
|
|
"lunarvim/onedarker.nvim",
|
|
|
|
branch = "freeze",
|
|
|
|
config = function()
|
|
|
|
pcall(function()
|
|
|
|
if lvim and lvim.colorscheme == "onedarker" then
|
|
|
|
require("onedarker").setup()
|
|
|
|
lvim.builtin.lualine.options.theme = "onedarker"
|
|
|
|
end
|
|
|
|
end)
|
|
|
|
end,
|
|
|
|
disable = lvim.colorscheme ~= "onedarker",
|
2022-09-19 19:12:52 +02: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)
|
|
|
|
local default_sha1 = vim.fn.json_decode(content)
|
|
|
|
|
|
|
|
local get_default_sha1 = function(spec)
|
|
|
|
local short_name, _ = require("packer.util").get_plugin_short_name(spec)
|
|
|
|
return default_sha1[short_name] and default_sha1[short_name].commit
|
|
|
|
end
|
|
|
|
|
|
|
|
for _, spec in ipairs(core_plugins) do
|
|
|
|
if not vim.env.LVIM_DEV_MODE then
|
|
|
|
-- Manually lock the commit hash since Packer's snapshots are unreliable in headless mode
|
|
|
|
spec["commit"] = get_default_sha1(spec)
|
2022-03-24 16:16:38 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
return core_plugins
|