2022-11-17 02:30:36 +01:00
|
|
|
-- List of all default plugins & their definitions
|
2022-01-30 08:21:46 +01:00
|
|
|
local plugins = {
|
2022-05-23 09:24:03 +02:00
|
|
|
|
2022-07-22 18:00:00 +02:00
|
|
|
["nvim-lua/plenary.nvim"] = { module = "plenary" },
|
2022-09-02 07:35:50 +02:00
|
|
|
|
|
|
|
["lewis6991/impatient.nvim"] = {},
|
|
|
|
|
2022-08-06 05:35:20 +02:00
|
|
|
["wbthomason/packer.nvim"] = {
|
2022-11-17 02:30:36 +01:00
|
|
|
cmd = {
|
|
|
|
"PackerSnapshot",
|
|
|
|
"PackerSnapshotRollback",
|
|
|
|
"PackerSnapshotDelete",
|
|
|
|
"PackerInstall",
|
|
|
|
"PackerUpdate",
|
|
|
|
"PackerSync",
|
|
|
|
"PackerClean",
|
|
|
|
"PackerCompile",
|
|
|
|
"PackerStatus",
|
|
|
|
"PackerProfile",
|
|
|
|
"PackerLoad",
|
|
|
|
},
|
2022-08-06 05:35:20 +02:00
|
|
|
config = function()
|
|
|
|
require "plugins"
|
2022-08-07 07:27:58 +02:00
|
|
|
end,
|
2022-08-06 05:35:20 +02:00
|
|
|
},
|
2022-09-02 07:35:50 +02:00
|
|
|
|
2022-07-22 18:00:00 +02:00
|
|
|
["NvChad/extensions"] = { module = { "telescope", "nvchad" } },
|
|
|
|
|
|
|
|
["NvChad/base46"] = {
|
2022-11-16 05:21:07 +01:00
|
|
|
branch = "dev",
|
2022-07-22 18:00:00 +02:00
|
|
|
config = function()
|
2022-11-17 18:46:28 +01:00
|
|
|
pcall(require, "base46_cache.defaults")
|
2022-07-22 18:00:00 +02:00
|
|
|
end,
|
|
|
|
},
|
|
|
|
|
|
|
|
["NvChad/ui"] = {
|
|
|
|
after = "base46",
|
2022-11-16 05:21:07 +01:00
|
|
|
branch = "dev",
|
2022-07-22 18:00:00 +02:00
|
|
|
config = function()
|
2022-09-02 07:35:50 +02:00
|
|
|
local present, nvchad_ui = pcall(require, "nvchad_ui")
|
|
|
|
|
|
|
|
if present then
|
|
|
|
nvchad_ui.setup()
|
|
|
|
end
|
2022-07-22 18:00:00 +02:00
|
|
|
end,
|
|
|
|
},
|
|
|
|
|
|
|
|
["NvChad/nvterm"] = {
|
|
|
|
module = "nvterm",
|
|
|
|
config = function()
|
|
|
|
require "plugins.configs.nvterm"
|
|
|
|
end,
|
2022-08-04 16:32:16 +02:00
|
|
|
setup = function()
|
|
|
|
require("core.utils").load_mappings "nvterm"
|
|
|
|
end,
|
2022-07-22 18:00:00 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
["kyazdani42/nvim-web-devicons"] = {
|
2022-08-04 16:32:16 +02:00
|
|
|
after = "ui",
|
2022-07-22 18:00:00 +02:00
|
|
|
module = "nvim-web-devicons",
|
|
|
|
config = function()
|
|
|
|
require("plugins.configs.others").devicons()
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
|
|
|
|
["lukas-reineke/indent-blankline.nvim"] = {
|
|
|
|
opt = true,
|
|
|
|
setup = function()
|
2022-11-17 02:30:36 +01:00
|
|
|
require("core.utils").lazy_load "indent-blankline.nvim"
|
2022-08-04 16:32:16 +02:00
|
|
|
require("core.utils").load_mappings "blankline"
|
2022-07-22 18:00:00 +02:00
|
|
|
end,
|
|
|
|
config = function()
|
|
|
|
require("plugins.configs.others").blankline()
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
|
|
|
|
["NvChad/nvim-colorizer.lua"] = {
|
|
|
|
opt = true,
|
|
|
|
setup = function()
|
2022-11-17 02:30:36 +01:00
|
|
|
require("core.utils").lazy_load "nvim-colorizer.lua"
|
2022-07-22 18:00:00 +02:00
|
|
|
end,
|
|
|
|
config = function()
|
|
|
|
require("plugins.configs.others").colorizer()
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
|
|
|
|
["nvim-treesitter/nvim-treesitter"] = {
|
|
|
|
module = "nvim-treesitter",
|
|
|
|
setup = function()
|
2022-11-17 02:30:36 +01:00
|
|
|
require("core.utils").lazy_load "nvim-treesitter"
|
2022-07-22 18:00:00 +02:00
|
|
|
end,
|
2022-11-17 02:30:36 +01:00
|
|
|
cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSEnable", "TSDisable", "TSModuleInfo" },
|
|
|
|
|
2022-07-22 18:00:00 +02:00
|
|
|
run = ":TSUpdate",
|
|
|
|
config = function()
|
|
|
|
require "plugins.configs.treesitter"
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
|
|
|
|
-- git stuff
|
|
|
|
["lewis6991/gitsigns.nvim"] = {
|
|
|
|
ft = "gitcommit",
|
|
|
|
setup = function()
|
2022-11-17 02:30:36 +01:00
|
|
|
-- load gitsigns only when a git file is opened
|
|
|
|
vim.api.nvim_create_autocmd({ "BufRead" }, {
|
|
|
|
group = vim.api.nvim_create_augroup("GitSignsLazyLoad", { clear = true }),
|
|
|
|
callback = function()
|
|
|
|
vim.fn.system("git -C " .. vim.fn.expand "%:p:h" .. " rev-parse")
|
|
|
|
if vim.v.shell_error == 0 then
|
|
|
|
vim.api.nvim_del_augroup_by_name "GitSignsLazyLoad"
|
|
|
|
vim.schedule(function()
|
|
|
|
require("packer").loader "gitsigns.nvim"
|
|
|
|
end)
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
})
|
2022-07-22 18:00:00 +02:00
|
|
|
end,
|
|
|
|
config = function()
|
|
|
|
require("plugins.configs.others").gitsigns()
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
|
|
|
|
-- lsp stuff
|
2022-07-25 15:49:33 +02:00
|
|
|
["williamboman/mason.nvim"] = {
|
2022-11-17 02:30:36 +01:00
|
|
|
cmd = { "Mason", "MasonInstall", "MasonInstallAll", "MasonUninstall", "MasonUninstallAll", "MasonLog" },
|
2022-07-25 15:49:33 +02:00
|
|
|
config = function()
|
|
|
|
require "plugins.configs.mason"
|
2022-07-22 18:00:00 +02:00
|
|
|
end,
|
|
|
|
},
|
|
|
|
|
|
|
|
["neovim/nvim-lspconfig"] = {
|
2022-07-25 15:49:33 +02:00
|
|
|
opt = true,
|
|
|
|
setup = function()
|
2022-11-17 02:30:36 +01:00
|
|
|
require("core.utils").lazy_load "nvim-lspconfig"
|
2022-07-25 15:49:33 +02:00
|
|
|
end,
|
2022-07-22 18:00:00 +02:00
|
|
|
config = function()
|
|
|
|
require "plugins.configs.lspconfig"
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
|
|
|
|
-- load luasnips + cmp related in insert mode only
|
|
|
|
|
|
|
|
["rafamadriz/friendly-snippets"] = {
|
2022-07-29 10:27:08 +02:00
|
|
|
module = { "cmp", "cmp_nvim_lsp" },
|
2022-07-22 18:00:00 +02:00
|
|
|
event = "InsertEnter",
|
|
|
|
},
|
|
|
|
|
|
|
|
["hrsh7th/nvim-cmp"] = {
|
|
|
|
after = "friendly-snippets",
|
|
|
|
config = function()
|
|
|
|
require "plugins.configs.cmp"
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
|
|
|
|
["L3MON4D3/LuaSnip"] = {
|
|
|
|
wants = "friendly-snippets",
|
|
|
|
after = "nvim-cmp",
|
|
|
|
config = function()
|
|
|
|
require("plugins.configs.others").luasnip()
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
|
2022-09-02 07:35:50 +02:00
|
|
|
["saadparwaiz1/cmp_luasnip"] = { after = "LuaSnip" },
|
|
|
|
["hrsh7th/cmp-nvim-lua"] = { after = "cmp_luasnip" },
|
|
|
|
["hrsh7th/cmp-nvim-lsp"] = { after = "cmp-nvim-lua" },
|
|
|
|
["hrsh7th/cmp-buffer"] = { after = "cmp-nvim-lsp" },
|
|
|
|
["hrsh7th/cmp-path"] = { after = "cmp-buffer" },
|
2022-07-22 18:00:00 +02:00
|
|
|
|
|
|
|
-- misc plugins
|
|
|
|
["windwp/nvim-autopairs"] = {
|
|
|
|
after = "nvim-cmp",
|
|
|
|
config = function()
|
|
|
|
require("plugins.configs.others").autopairs()
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
|
|
|
|
["numToStr/Comment.nvim"] = {
|
|
|
|
module = "Comment",
|
|
|
|
keys = { "gc", "gb" },
|
|
|
|
config = function()
|
|
|
|
require("plugins.configs.others").comment()
|
|
|
|
end,
|
2022-08-04 16:32:16 +02:00
|
|
|
setup = function()
|
|
|
|
require("core.utils").load_mappings "comment"
|
|
|
|
end,
|
2022-07-22 18:00:00 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
-- file managing , picker etc
|
|
|
|
["kyazdani42/nvim-tree.lua"] = {
|
|
|
|
cmd = { "NvimTreeToggle", "NvimTreeFocus" },
|
|
|
|
config = function()
|
|
|
|
require "plugins.configs.nvimtree"
|
|
|
|
end,
|
2022-08-04 16:32:16 +02:00
|
|
|
setup = function()
|
|
|
|
require("core.utils").load_mappings "nvimtree"
|
|
|
|
end,
|
2022-07-22 18:00:00 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
["nvim-telescope/telescope.nvim"] = {
|
|
|
|
cmd = "Telescope",
|
|
|
|
config = function()
|
|
|
|
require "plugins.configs.telescope"
|
|
|
|
end,
|
2022-08-04 16:32:16 +02:00
|
|
|
setup = function()
|
|
|
|
require("core.utils").load_mappings "telescope"
|
|
|
|
end,
|
2022-07-22 18:00:00 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
-- Only load whichkey after all the gui
|
|
|
|
["folke/which-key.nvim"] = {
|
2022-08-07 06:40:50 +02:00
|
|
|
disable = true,
|
2022-07-22 18:00:00 +02:00
|
|
|
module = "which-key",
|
2022-09-15 04:21:13 +02:00
|
|
|
keys = { "<leader>", '"', "'", "`" },
|
2022-07-22 18:00:00 +02:00
|
|
|
config = function()
|
|
|
|
require "plugins.configs.whichkey"
|
|
|
|
end,
|
2022-08-04 16:32:16 +02:00
|
|
|
setup = function()
|
|
|
|
require("core.utils").load_mappings "whichkey"
|
|
|
|
end,
|
2022-07-22 18:00:00 +02:00
|
|
|
},
|
2022-01-30 08:21:46 +01:00
|
|
|
}
|
2022-02-13 08:39:07 +01:00
|
|
|
|
2022-09-02 07:35:50 +02:00
|
|
|
local present, packer = pcall(require, "packer")
|
|
|
|
|
|
|
|
if present then
|
|
|
|
vim.cmd "packadd packer.nvim"
|
|
|
|
|
|
|
|
-- Override with default plugins with user ones
|
|
|
|
plugins = require("core.utils").merge_plugins(plugins)
|
|
|
|
|
|
|
|
-- load packer init options
|
|
|
|
local init_options = require("plugins.configs.others").packer_init()
|
|
|
|
init_options = require("core.utils").load_override(init_options, "wbthomason/packer.nvim")
|
|
|
|
|
2022-10-04 03:07:48 +02:00
|
|
|
packer.init(init_options)
|
|
|
|
packer.startup { plugins }
|
2022-09-02 07:35:50 +02:00
|
|
|
end
|