2023-01-07 03:11:43 -05:00
|
|
|
-- All plugins have lazy=true by default,to load a plugin on startup just lazy=false
|
2022-11-16 20:30:36 -05:00
|
|
|
-- List of all default plugins & their definitions
|
2022-01-30 02:21:46 -05:00
|
|
|
local plugins = {
|
2022-05-23 03:24:03 -04:00
|
|
|
|
2023-01-07 03:11:43 -05:00
|
|
|
["nvim-lua/plenary.nvim"] = {},
|
2022-09-02 01:35:50 -04:00
|
|
|
|
2023-01-07 21:10:00 -05:00
|
|
|
["NvChad/extensions"] = { branch = "v2.0" },
|
2022-07-22 12:00:00 -04:00
|
|
|
|
|
|
|
["NvChad/base46"] = {
|
2023-01-07 21:10:00 -05:00
|
|
|
branch = "v2.0",
|
2022-07-22 12:00:00 -04:00
|
|
|
},
|
|
|
|
|
|
|
|
["NvChad/ui"] = {
|
2023-01-07 21:10:00 -05:00
|
|
|
branch = "v2.0",
|
2023-01-07 03:11:43 -05:00
|
|
|
lazy = false,
|
2022-07-22 12:00:00 -04:00
|
|
|
config = function()
|
2023-01-07 03:11:43 -05:00
|
|
|
require "nvchad_ui"
|
2022-07-22 12:00:00 -04:00
|
|
|
end,
|
|
|
|
},
|
|
|
|
|
|
|
|
["NvChad/nvterm"] = {
|
|
|
|
config = function()
|
2023-01-29 13:00:13 -05:00
|
|
|
require "base46.term"
|
|
|
|
local options = require("core.utils").load_override({}, "NvChad/nvterm")
|
|
|
|
require("nvterm").setup(options)
|
2022-07-22 12:00:00 -04:00
|
|
|
end,
|
2023-01-07 03:11:43 -05:00
|
|
|
init = function()
|
2022-08-04 10:32:16 -04:00
|
|
|
require("core.utils").load_mappings "nvterm"
|
|
|
|
end,
|
2022-07-22 12:00:00 -04:00
|
|
|
},
|
|
|
|
|
2023-01-16 17:53:25 -05:00
|
|
|
["nvim-tree/nvim-web-devicons"] = {
|
2022-07-22 12:00:00 -04:00
|
|
|
config = function()
|
|
|
|
require("plugins.configs.others").devicons()
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
|
|
|
|
["lukas-reineke/indent-blankline.nvim"] = {
|
2023-01-07 03:11:43 -05:00
|
|
|
init = function()
|
2022-11-16 20:30:36 -05:00
|
|
|
require("core.utils").lazy_load "indent-blankline.nvim"
|
2022-08-04 10:32:16 -04:00
|
|
|
require("core.utils").load_mappings "blankline"
|
2022-07-22 12:00:00 -04:00
|
|
|
end,
|
|
|
|
config = function()
|
|
|
|
require("plugins.configs.others").blankline()
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
|
|
|
|
["NvChad/nvim-colorizer.lua"] = {
|
2023-01-07 03:11:43 -05:00
|
|
|
init = function()
|
2022-11-16 20:30:36 -05:00
|
|
|
require("core.utils").lazy_load "nvim-colorizer.lua"
|
2022-07-22 12:00:00 -04:00
|
|
|
end,
|
|
|
|
config = function()
|
|
|
|
require("plugins.configs.others").colorizer()
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
|
|
|
|
["nvim-treesitter/nvim-treesitter"] = {
|
2023-01-07 03:11:43 -05:00
|
|
|
init = function()
|
2022-11-16 20:30:36 -05:00
|
|
|
require("core.utils").lazy_load "nvim-treesitter"
|
2022-07-22 12:00:00 -04:00
|
|
|
end,
|
2022-11-16 20:30:36 -05:00
|
|
|
cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSEnable", "TSDisable", "TSModuleInfo" },
|
2023-01-25 22:28:44 -05:00
|
|
|
build = ":TSUpdate",
|
2022-07-22 12:00:00 -04:00
|
|
|
config = function()
|
|
|
|
require "plugins.configs.treesitter"
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
|
|
|
|
-- git stuff
|
|
|
|
["lewis6991/gitsigns.nvim"] = {
|
|
|
|
ft = "gitcommit",
|
2023-01-07 03:11:43 -05:00
|
|
|
init = function()
|
2022-11-16 20:30:36 -05: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()
|
2023-01-07 03:11:43 -05:00
|
|
|
require("lazy").load { plugins = "gitsigns.nvim" }
|
2022-11-16 20:30:36 -05:00
|
|
|
end)
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
})
|
2022-07-22 12:00:00 -04:00
|
|
|
end,
|
|
|
|
config = function()
|
|
|
|
require("plugins.configs.others").gitsigns()
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
|
|
|
|
-- lsp stuff
|
2022-07-25 09:49:33 -04:00
|
|
|
["williamboman/mason.nvim"] = {
|
2022-11-16 20:30:36 -05:00
|
|
|
cmd = { "Mason", "MasonInstall", "MasonInstallAll", "MasonUninstall", "MasonUninstallAll", "MasonLog" },
|
2022-07-25 09:49:33 -04:00
|
|
|
config = function()
|
|
|
|
require "plugins.configs.mason"
|
2022-07-22 12:00:00 -04:00
|
|
|
end,
|
|
|
|
},
|
|
|
|
|
|
|
|
["neovim/nvim-lspconfig"] = {
|
2023-01-07 03:11:43 -05:00
|
|
|
init = function()
|
2022-11-16 20:30:36 -05:00
|
|
|
require("core.utils").lazy_load "nvim-lspconfig"
|
2022-07-25 09:49:33 -04:00
|
|
|
end,
|
2022-07-22 12:00:00 -04:00
|
|
|
config = function()
|
|
|
|
require "plugins.configs.lspconfig"
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
|
|
|
|
-- load luasnips + cmp related in insert mode only
|
|
|
|
["hrsh7th/nvim-cmp"] = {
|
2023-01-07 03:11:43 -05:00
|
|
|
event = "InsertEnter",
|
|
|
|
dependencies = {
|
|
|
|
{
|
|
|
|
-- snippet plugin
|
|
|
|
"L3MON4D3/LuaSnip",
|
|
|
|
dependencies = "rafamadriz/friendly-snippets",
|
|
|
|
config = function()
|
|
|
|
require("plugins.configs.others").luasnip()
|
|
|
|
end,
|
|
|
|
},
|
2022-07-22 12:00:00 -04:00
|
|
|
|
2023-01-07 03:11:43 -05:00
|
|
|
-- autopairing of (){}[] etc
|
|
|
|
{
|
|
|
|
"windwp/nvim-autopairs",
|
|
|
|
config = function()
|
|
|
|
require("plugins.configs.others").autopairs()
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
|
|
|
|
-- cmp sources plugins
|
|
|
|
{
|
|
|
|
"saadparwaiz1/cmp_luasnip",
|
|
|
|
"hrsh7th/cmp-nvim-lua",
|
|
|
|
"hrsh7th/cmp-nvim-lsp",
|
|
|
|
"hrsh7th/cmp-buffer",
|
|
|
|
"hrsh7th/cmp-path",
|
|
|
|
},
|
|
|
|
},
|
2022-07-22 12:00:00 -04:00
|
|
|
|
|
|
|
config = function()
|
2023-01-07 03:11:43 -05:00
|
|
|
require "plugins.configs.cmp"
|
2022-07-22 12:00:00 -04:00
|
|
|
end,
|
|
|
|
},
|
|
|
|
|
|
|
|
["numToStr/Comment.nvim"] = {
|
2023-01-07 03:11:43 -05:00
|
|
|
-- keys = { "gc", "gb" },
|
2022-07-22 12:00:00 -04:00
|
|
|
config = function()
|
|
|
|
require("plugins.configs.others").comment()
|
|
|
|
end,
|
2023-01-07 03:11:43 -05:00
|
|
|
init = function()
|
2022-08-04 10:32:16 -04:00
|
|
|
require("core.utils").load_mappings "comment"
|
|
|
|
end,
|
2022-07-22 12:00:00 -04:00
|
|
|
},
|
|
|
|
|
|
|
|
-- file managing , picker etc
|
2023-01-16 17:53:25 -05:00
|
|
|
["nvim-tree/nvim-tree.lua"] = {
|
2022-07-22 12:00:00 -04:00
|
|
|
cmd = { "NvimTreeToggle", "NvimTreeFocus" },
|
|
|
|
config = function()
|
|
|
|
require "plugins.configs.nvimtree"
|
|
|
|
end,
|
2023-01-07 03:11:43 -05:00
|
|
|
init = function()
|
2022-08-04 10:32:16 -04:00
|
|
|
require("core.utils").load_mappings "nvimtree"
|
|
|
|
end,
|
2022-07-22 12:00:00 -04:00
|
|
|
},
|
|
|
|
|
|
|
|
["nvim-telescope/telescope.nvim"] = {
|
|
|
|
cmd = "Telescope",
|
|
|
|
config = function()
|
|
|
|
require "plugins.configs.telescope"
|
|
|
|
end,
|
2023-01-07 03:11:43 -05:00
|
|
|
init = function()
|
2022-08-04 10:32:16 -04:00
|
|
|
require("core.utils").load_mappings "telescope"
|
|
|
|
end,
|
2022-07-22 12:00:00 -04:00
|
|
|
},
|
|
|
|
|
|
|
|
-- Only load whichkey after all the gui
|
|
|
|
["folke/which-key.nvim"] = {
|
2023-01-07 03:11:43 -05:00
|
|
|
enabled = false,
|
2022-09-14 22:21:13 -04:00
|
|
|
keys = { "<leader>", '"', "'", "`" },
|
2022-07-22 12:00:00 -04:00
|
|
|
config = function()
|
|
|
|
require "plugins.configs.whichkey"
|
|
|
|
end,
|
2023-01-07 03:11:43 -05:00
|
|
|
init = function()
|
2022-08-04 10:32:16 -04:00
|
|
|
require("core.utils").load_mappings "whichkey"
|
|
|
|
end,
|
2022-07-22 12:00:00 -04:00
|
|
|
},
|
2022-01-30 02:21:46 -05:00
|
|
|
}
|
2022-02-13 02:39:07 -05:00
|
|
|
|
2023-01-07 21:10:00 -05:00
|
|
|
-- pin commits for all default plugins
|
|
|
|
for _, value in pairs(plugins) do
|
|
|
|
value.pin = true
|
|
|
|
end
|
|
|
|
|
2023-01-07 03:11:43 -05:00
|
|
|
plugins = require("core.utils").merge_plugins(plugins)
|
2022-09-02 01:35:50 -04:00
|
|
|
|
2023-01-07 03:11:43 -05:00
|
|
|
-- load lazy.nvim options
|
|
|
|
local lazy_config = require "plugins.configs.lazy_nvim"
|
|
|
|
lazy_config = require("core.utils").load_override(lazy_config, "folke/lazy.nvim")
|
2022-09-02 01:35:50 -04:00
|
|
|
|
2023-01-07 03:11:43 -05:00
|
|
|
require("lazy").setup(plugins, lazy_config)
|