2021-08-22 07:49:15 +00:00
|
|
|
local present, packer = pcall(require, "plugins.packerInit")
|
2021-08-12 11:58:03 +00:00
|
|
|
|
2021-08-22 07:49:15 +00:00
|
|
|
if not present then
|
2021-08-16 07:49:09 +00:00
|
|
|
return false
|
2021-07-15 15:46:45 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
local use = packer.use
|
2021-07-09 03:44:04 +00:00
|
|
|
|
2021-08-16 07:49:09 +00:00
|
|
|
return packer.startup(function()
|
2021-08-22 07:49:15 +00:00
|
|
|
local plugin_status = require("core.utils").load_config().plugin_status
|
|
|
|
|
|
|
|
-- this is arranged on the basis of when a plugin starts
|
|
|
|
|
|
|
|
-- this is the nvchad core repo containing utilities for some features like theme swticher, no need to lazy load
|
|
|
|
use {
|
2021-08-22 12:17:14 +00:00
|
|
|
"Nvchad/extensions",
|
2021-08-22 07:49:15 +00:00
|
|
|
}
|
|
|
|
|
2021-08-26 09:40:26 +00:00
|
|
|
use {
|
|
|
|
"nvim-lua/plenary.nvim",
|
|
|
|
}
|
|
|
|
|
2021-08-16 07:49:09 +00:00
|
|
|
use {
|
|
|
|
"wbthomason/packer.nvim",
|
|
|
|
event = "VimEnter",
|
|
|
|
}
|
2021-06-01 18:28:24 +00:00
|
|
|
|
2021-08-16 07:49:09 +00:00
|
|
|
use {
|
2021-08-22 07:49:15 +00:00
|
|
|
"NvChad/nvim-base16.lua",
|
|
|
|
after = "packer.nvim",
|
|
|
|
config = function()
|
|
|
|
require("colors").init()
|
|
|
|
end,
|
|
|
|
}
|
|
|
|
|
|
|
|
use {
|
|
|
|
"kyazdani42/nvim-web-devicons",
|
|
|
|
after = "nvim-base16.lua",
|
2021-08-16 07:49:09 +00:00
|
|
|
config = function()
|
2021-08-22 07:49:15 +00:00
|
|
|
require "plugins.configs.icons"
|
2021-08-16 07:49:09 +00:00
|
|
|
end,
|
|
|
|
}
|
2021-07-26 09:36:32 +00:00
|
|
|
|
2021-08-17 06:42:33 +00:00
|
|
|
use {
|
2021-08-26 05:18:13 +00:00
|
|
|
"famiu/feline.nvim",
|
|
|
|
disable = not plugin_status.feline,
|
2021-08-17 06:42:33 +00:00
|
|
|
after = "nvim-web-devicons",
|
|
|
|
config = function()
|
2021-08-22 07:49:15 +00:00
|
|
|
require "plugins.configs.statusline"
|
2021-08-17 06:42:33 +00:00
|
|
|
end,
|
|
|
|
}
|
2021-08-22 07:49:15 +00:00
|
|
|
|
2021-08-16 07:49:09 +00:00
|
|
|
use {
|
2021-08-22 07:28:59 +00:00
|
|
|
"akinsho/bufferline.nvim",
|
2021-08-22 07:49:15 +00:00
|
|
|
disable = not plugin_status.bufferline,
|
2021-08-26 09:40:26 +00:00
|
|
|
after = "nvim-web-devicons",
|
2021-08-16 07:49:09 +00:00
|
|
|
config = function()
|
2021-08-22 07:49:15 +00:00
|
|
|
require "plugins.configs.bufferline"
|
2021-08-16 07:49:09 +00:00
|
|
|
end,
|
|
|
|
setup = function()
|
2021-08-22 07:49:15 +00:00
|
|
|
require("core.mappings").bufferline()
|
2021-08-16 07:49:09 +00:00
|
|
|
end,
|
|
|
|
}
|
2021-07-09 03:44:04 +00:00
|
|
|
|
2021-08-22 07:49:15 +00:00
|
|
|
use {
|
|
|
|
"lukas-reineke/indent-blankline.nvim",
|
|
|
|
disable = not plugin_status.blankline,
|
|
|
|
event = "BufRead",
|
|
|
|
config = function()
|
|
|
|
require("plugins.configs.others").blankline()
|
2021-08-16 07:49:09 +00:00
|
|
|
end,
|
|
|
|
}
|
2021-06-27 15:29:39 +00:00
|
|
|
|
2021-08-16 07:49:09 +00:00
|
|
|
use {
|
|
|
|
"norcalli/nvim-colorizer.lua",
|
2021-08-22 07:49:15 +00:00
|
|
|
disable = not plugin_status.colorizer,
|
2021-08-16 07:49:09 +00:00
|
|
|
event = "BufRead",
|
|
|
|
config = function()
|
2021-08-22 07:49:15 +00:00
|
|
|
require("plugins.configs.others").colorizer()
|
2021-08-16 07:49:09 +00:00
|
|
|
end,
|
|
|
|
}
|
2021-06-01 18:28:24 +00:00
|
|
|
|
2021-08-16 07:49:09 +00:00
|
|
|
use {
|
|
|
|
"nvim-treesitter/nvim-treesitter",
|
|
|
|
event = "BufRead",
|
|
|
|
config = function()
|
2021-08-22 07:49:15 +00:00
|
|
|
require "plugins.configs.treesitter"
|
2021-08-16 07:49:09 +00:00
|
|
|
end,
|
|
|
|
}
|
2021-06-25 16:06:13 +00:00
|
|
|
|
2021-08-26 09:40:26 +00:00
|
|
|
-- git stuff
|
|
|
|
use {
|
|
|
|
"lewis6991/gitsigns.nvim",
|
|
|
|
disable = not plugin_status.gitsigns,
|
|
|
|
opt = true,
|
|
|
|
config = function()
|
|
|
|
require "plugins.configs.gitsigns"
|
|
|
|
end,
|
|
|
|
setup = function()
|
|
|
|
require("core.utils").packer_lazy_load "gitsigns.nvim"
|
|
|
|
end,
|
|
|
|
}
|
|
|
|
|
|
|
|
-- smooth scroll
|
|
|
|
use {
|
|
|
|
"karb94/neoscroll.nvim",
|
|
|
|
disable = not plugin_status.neoscroll,
|
|
|
|
opt = true,
|
|
|
|
config = function()
|
|
|
|
require("plugins.configs.others").neoscroll()
|
|
|
|
end,
|
|
|
|
setup = function()
|
|
|
|
require("core.utils").packer_lazy_load "neoscroll.nvim"
|
|
|
|
end,
|
|
|
|
}
|
|
|
|
|
2021-08-27 02:26:44 +00:00
|
|
|
-- lsp stuff
|
2021-08-16 07:49:09 +00:00
|
|
|
use {
|
|
|
|
"kabouzeid/nvim-lspinstall",
|
2021-08-26 09:40:26 +00:00
|
|
|
opt = true,
|
|
|
|
setup = function()
|
|
|
|
require("core.utils").packer_lazy_load "nvim-lspinstall"
|
2021-08-26 18:14:12 +00:00
|
|
|
-- reload the current file so lsp actually starts for it
|
|
|
|
vim.defer_fn(function()
|
|
|
|
vim.cmd "silent! e %"
|
|
|
|
end, 0)
|
2021-08-26 09:40:26 +00:00
|
|
|
end,
|
2021-08-16 07:49:09 +00:00
|
|
|
}
|
2021-07-10 13:36:41 +00:00
|
|
|
|
2021-08-16 07:49:09 +00:00
|
|
|
use {
|
|
|
|
"neovim/nvim-lspconfig",
|
|
|
|
after = "nvim-lspinstall",
|
|
|
|
config = function()
|
2021-08-22 07:49:15 +00:00
|
|
|
require "plugins.configs.lspconfig"
|
|
|
|
end,
|
|
|
|
}
|
|
|
|
|
|
|
|
use {
|
|
|
|
"ray-x/lsp_signature.nvim",
|
|
|
|
disable = not plugin_status.lspsignature,
|
|
|
|
after = "nvim-lspconfig",
|
|
|
|
config = function()
|
|
|
|
require("plugins.configs.others").signature()
|
2021-08-16 07:49:09 +00:00
|
|
|
end,
|
|
|
|
}
|
2021-06-24 17:19:42 +00:00
|
|
|
|
2021-08-26 09:40:26 +00:00
|
|
|
use {
|
|
|
|
"andymass/vim-matchup",
|
|
|
|
disable = not plugin_status.vim_matchup,
|
|
|
|
opt = true,
|
|
|
|
setup = function()
|
|
|
|
require("core.utils").packer_lazy_load "vim-matchup"
|
|
|
|
end,
|
|
|
|
}
|
|
|
|
|
|
|
|
-- load autosave only if its globally enabled
|
|
|
|
use {
|
|
|
|
disable = not plugin_status.autosave,
|
|
|
|
"Pocco81/AutoSave.nvim",
|
|
|
|
config = function()
|
2021-08-27 01:14:58 +00:00
|
|
|
require("plugins.configs.others").autosave()
|
2021-08-26 09:40:26 +00:00
|
|
|
end,
|
|
|
|
cond = function()
|
|
|
|
return require("core.utils").load_config().options.plugin.autosave == true
|
|
|
|
end,
|
|
|
|
}
|
|
|
|
|
2021-08-16 07:49:09 +00:00
|
|
|
use {
|
2021-08-22 07:49:15 +00:00
|
|
|
"jdhao/better-escape.vim",
|
|
|
|
disable = not plugin_status.esc_insertmode,
|
|
|
|
event = "InsertEnter",
|
2021-08-16 07:49:09 +00:00
|
|
|
config = function()
|
2021-08-22 07:49:15 +00:00
|
|
|
require("plugins.configs.others").better_escape()
|
|
|
|
end,
|
|
|
|
setup = function()
|
|
|
|
require("core.mappings").better_escape()
|
2021-08-16 07:49:09 +00:00
|
|
|
end,
|
|
|
|
}
|
2021-08-07 05:55:23 +00:00
|
|
|
|
2021-08-27 01:14:58 +00:00
|
|
|
-- load luasnips + cmp related in insert mode only
|
|
|
|
|
2021-08-16 07:49:09 +00:00
|
|
|
use {
|
2021-08-27 02:41:46 +00:00
|
|
|
"hrsh7th/nvim-cmp",
|
2021-08-16 07:49:09 +00:00
|
|
|
event = "InsertEnter",
|
|
|
|
config = function()
|
2021-08-27 02:41:46 +00:00
|
|
|
require "plugins.configs.cmp"
|
2021-08-27 01:14:58 +00:00
|
|
|
end,
|
|
|
|
}
|
|
|
|
|
|
|
|
use {
|
2021-08-27 02:41:46 +00:00
|
|
|
"L3MON4D3/LuaSnip",
|
|
|
|
wants = "friendly-snippets",
|
|
|
|
after = "nvim-cmp",
|
2021-08-27 01:14:58 +00:00
|
|
|
config = function()
|
2021-08-27 02:41:46 +00:00
|
|
|
require "plugins.configs.luasnip"
|
2021-08-27 01:14:58 +00:00
|
|
|
end,
|
|
|
|
}
|
|
|
|
|
|
|
|
use {
|
|
|
|
"saadparwaiz1/cmp_luasnip",
|
2021-08-27 02:41:46 +00:00
|
|
|
after = "LuaSnip",
|
2021-08-27 01:14:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
use {
|
|
|
|
"hrsh7th/cmp-nvim-lua",
|
|
|
|
after = "cmp_luasnip",
|
|
|
|
}
|
|
|
|
|
|
|
|
use {
|
|
|
|
"hrsh7th/cmp-nvim-lsp",
|
|
|
|
after = "cmp-nvim-lua",
|
|
|
|
}
|
|
|
|
|
|
|
|
use {
|
|
|
|
"hrsh7th/cmp-buffer",
|
|
|
|
after = "cmp-nvim-lsp",
|
|
|
|
}
|
|
|
|
|
|
|
|
use {
|
|
|
|
"rafamadriz/friendly-snippets",
|
|
|
|
after = "cmp-buffer",
|
2021-08-16 07:49:09 +00:00
|
|
|
}
|
2021-06-26 02:27:09 +00:00
|
|
|
|
2021-08-16 07:49:09 +00:00
|
|
|
-- misc plugins
|
|
|
|
use {
|
|
|
|
"windwp/nvim-autopairs",
|
2021-08-27 01:14:58 +00:00
|
|
|
after = "nvim-cmp",
|
2021-08-16 07:49:09 +00:00
|
|
|
config = function()
|
2021-08-27 01:14:58 +00:00
|
|
|
require("plugins.configs.others").autopairs()
|
2021-08-16 07:49:09 +00:00
|
|
|
end,
|
|
|
|
}
|
2021-05-12 17:23:35 +00:00
|
|
|
|
2021-08-16 07:49:09 +00:00
|
|
|
use {
|
|
|
|
"glepnir/dashboard-nvim",
|
2021-08-22 07:49:15 +00:00
|
|
|
disable = not plugin_status.dashboard,
|
2021-08-16 07:49:09 +00:00
|
|
|
cmd = {
|
|
|
|
"Dashboard",
|
|
|
|
"DashboardNewFile",
|
|
|
|
"DashboardJumpMarks",
|
|
|
|
"SessionLoad",
|
|
|
|
"SessionSave",
|
|
|
|
},
|
2021-08-22 07:49:15 +00:00
|
|
|
config = function()
|
|
|
|
require "plugins.configs.dashboard"
|
|
|
|
end,
|
2021-08-16 07:49:09 +00:00
|
|
|
setup = function()
|
2021-08-22 07:49:15 +00:00
|
|
|
require("core.mappings").dashboard()
|
2021-08-16 07:49:09 +00:00
|
|
|
end,
|
|
|
|
}
|
2021-06-26 02:10:23 +00:00
|
|
|
|
2021-08-16 07:49:09 +00:00
|
|
|
use {
|
2021-08-22 07:49:15 +00:00
|
|
|
"sbdchd/neoformat",
|
|
|
|
disable = not plugin_status.neoformat,
|
|
|
|
cmd = "Neoformat",
|
|
|
|
setup = function()
|
|
|
|
require("core.mappings").neoformat()
|
|
|
|
end,
|
|
|
|
}
|
|
|
|
|
|
|
|
-- use "alvan/vim-closetag" -- for html autoclosing tag
|
|
|
|
use {
|
|
|
|
"terrortylor/nvim-comment",
|
|
|
|
disable = not plugin_status.comment,
|
|
|
|
cmd = "CommentToggle",
|
2021-08-16 07:49:09 +00:00
|
|
|
config = function()
|
2021-08-22 07:49:15 +00:00
|
|
|
require("plugins.configs.others").comment()
|
2021-08-16 07:49:09 +00:00
|
|
|
end,
|
2021-08-22 07:49:15 +00:00
|
|
|
setup = function()
|
|
|
|
require("core.mappings").comment()
|
2021-08-16 07:49:09 +00:00
|
|
|
end,
|
|
|
|
}
|
2021-06-24 17:21:39 +00:00
|
|
|
|
2021-08-22 07:49:15 +00:00
|
|
|
-- file managing , picker etc
|
2021-08-16 07:49:09 +00:00
|
|
|
use {
|
2021-08-22 07:49:15 +00:00
|
|
|
"kyazdani42/nvim-tree.lua",
|
2021-08-24 10:07:38 +00:00
|
|
|
cmd = { "NvimTreeToggle", "NvimTreeFocus" },
|
2021-08-16 07:49:09 +00:00
|
|
|
config = function()
|
2021-08-22 07:49:15 +00:00
|
|
|
require "plugins.configs.nvimtree"
|
|
|
|
end,
|
|
|
|
setup = function()
|
|
|
|
require("core.mappings").nvimtree()
|
2021-08-16 07:49:09 +00:00
|
|
|
end,
|
|
|
|
}
|
2021-06-26 02:22:48 +00:00
|
|
|
|
2021-08-22 07:45:25 +00:00
|
|
|
use {
|
|
|
|
"nvim-telescope/telescope.nvim",
|
|
|
|
cmd = "Telescope",
|
|
|
|
-- because cheatsheet is not activated by a teleacope command
|
|
|
|
module = "cheatsheet",
|
|
|
|
requires = {
|
|
|
|
{
|
|
|
|
"sudormrfbin/cheatsheet.nvim",
|
|
|
|
disable = not plugin_status.cheatsheet,
|
|
|
|
after = "telescope.nvim",
|
|
|
|
config = function()
|
|
|
|
require "plugins.configs.chadsheet"
|
|
|
|
end,
|
|
|
|
setup = function()
|
|
|
|
require("core.mappings").chadsheet()
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"nvim-telescope/telescope-fzf-native.nvim",
|
|
|
|
run = "make",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"nvim-telescope/telescope-media-files.nvim",
|
|
|
|
disable = not plugin_status.telescope_media,
|
|
|
|
setup = function()
|
|
|
|
require("core.mappings").telescope_media()
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
config = function()
|
|
|
|
require "plugins.configs.telescope"
|
|
|
|
end,
|
|
|
|
setup = function()
|
|
|
|
require("core.mappings").telescope()
|
|
|
|
end,
|
|
|
|
}
|
|
|
|
|
2021-08-16 07:49:09 +00:00
|
|
|
use {
|
|
|
|
"Pocco81/TrueZen.nvim",
|
2021-08-22 07:49:15 +00:00
|
|
|
disable = not plugin_status.truezen,
|
2021-08-16 07:49:09 +00:00
|
|
|
cmd = {
|
|
|
|
"TZAtaraxis",
|
|
|
|
"TZMinimalist",
|
|
|
|
"TZFocus",
|
|
|
|
},
|
|
|
|
config = function()
|
2021-08-22 07:49:15 +00:00
|
|
|
require "plugins.configs.zenmode"
|
2021-08-16 07:49:09 +00:00
|
|
|
end,
|
|
|
|
setup = function()
|
2021-08-22 07:49:15 +00:00
|
|
|
require("core.mappings").truezen()
|
2021-08-16 07:49:09 +00:00
|
|
|
end,
|
|
|
|
}
|
2021-07-23 17:22:09 +00:00
|
|
|
|
2021-08-16 07:49:09 +00:00
|
|
|
use {
|
|
|
|
"tpope/vim-fugitive",
|
|
|
|
disable = not plugin_status.vim_fugitive,
|
|
|
|
cmd = {
|
|
|
|
"Git",
|
2021-08-23 23:11:02 +00:00
|
|
|
"Gdiff",
|
|
|
|
"Gdiffsplit",
|
|
|
|
"Gvdiffsplit",
|
|
|
|
"Gwrite",
|
|
|
|
"Gw",
|
2021-08-16 07:49:09 +00:00
|
|
|
},
|
|
|
|
setup = function()
|
2021-08-22 07:49:15 +00:00
|
|
|
require("core.mappings").vim_fugitive()
|
2021-08-16 07:49:09 +00:00
|
|
|
end,
|
|
|
|
}
|
|
|
|
end)
|