2021-08-22 03:49:15 -04:00
|
|
|
local present, packer = pcall(require, "plugins.packerInit")
|
2021-08-12 07:58:03 -04:00
|
|
|
|
2021-08-22 03:49:15 -04:00
|
|
|
if not present then
|
2021-08-16 03:49:09 -04:00
|
|
|
return false
|
2021-07-15 11:46:45 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
local use = packer.use
|
2021-07-08 23:44:04 -04:00
|
|
|
|
2021-08-16 03:49:09 -04:00
|
|
|
return packer.startup(function()
|
2021-08-22 03:49:15 -04: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 {
|
|
|
|
"Nvchad/core",
|
|
|
|
}
|
|
|
|
|
2021-08-16 03:49:09 -04:00
|
|
|
use {
|
|
|
|
"wbthomason/packer.nvim",
|
|
|
|
event = "VimEnter",
|
|
|
|
}
|
2021-06-01 14:28:24 -04:00
|
|
|
|
2021-08-16 03:49:09 -04:00
|
|
|
use {
|
2021-08-22 03:49:15 -04: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 03:49:09 -04:00
|
|
|
config = function()
|
2021-08-22 03:49:15 -04:00
|
|
|
require "plugins.configs.icons"
|
2021-08-16 03:49:09 -04:00
|
|
|
end,
|
|
|
|
}
|
2021-07-26 05:36:32 -04:00
|
|
|
|
2021-08-17 02:42:33 -04:00
|
|
|
use {
|
|
|
|
"glepnir/galaxyline.nvim",
|
|
|
|
disable = not plugin_status.galaxyline,
|
|
|
|
after = "nvim-web-devicons",
|
|
|
|
config = function()
|
2021-08-22 03:49:15 -04:00
|
|
|
require "plugins.configs.statusline"
|
2021-08-17 02:42:33 -04:00
|
|
|
end,
|
|
|
|
}
|
2021-08-22 03:49:15 -04:00
|
|
|
|
2021-08-16 03:49:09 -04:00
|
|
|
use {
|
2021-08-22 03:28:59 -04:00
|
|
|
"akinsho/bufferline.nvim",
|
2021-08-22 03:49:15 -04:00
|
|
|
disable = not plugin_status.bufferline,
|
2021-08-17 02:42:33 -04:00
|
|
|
after = "galaxyline.nvim",
|
2021-08-16 03:49:09 -04:00
|
|
|
config = function()
|
2021-08-22 03:49:15 -04:00
|
|
|
require "plugins.configs.bufferline"
|
2021-08-16 03:49:09 -04:00
|
|
|
end,
|
|
|
|
setup = function()
|
2021-08-22 03:49:15 -04:00
|
|
|
require("core.mappings").bufferline()
|
2021-08-16 03:49:09 -04:00
|
|
|
end,
|
|
|
|
}
|
2021-07-08 23:44:04 -04:00
|
|
|
|
2021-08-16 03:49:09 -04:00
|
|
|
use {
|
2021-08-22 03:49:15 -04:00
|
|
|
"nvim-lua/plenary.nvim",
|
|
|
|
after = "bufferline.nvim",
|
|
|
|
}
|
|
|
|
|
|
|
|
-- git stuff
|
|
|
|
use {
|
|
|
|
"lewis6991/gitsigns.nvim",
|
|
|
|
disable = not plugin_status.gitsigns,
|
|
|
|
after = "plenary.nvim",
|
2021-08-16 03:49:09 -04:00
|
|
|
config = function()
|
2021-08-22 03:49:15 -04:00
|
|
|
require "plugins.configs.gitsigns"
|
|
|
|
end,
|
|
|
|
}
|
|
|
|
|
|
|
|
use {
|
|
|
|
"nvim-telescope/telescope.nvim",
|
|
|
|
after = "plenary.nvim",
|
|
|
|
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,
|
|
|
|
}
|
|
|
|
|
|
|
|
-- load autosave only if its globally enabled
|
|
|
|
use {
|
|
|
|
disable = not plugin_status.autosave,
|
|
|
|
"Pocco81/AutoSave.nvim",
|
|
|
|
config = function()
|
|
|
|
require "plugins.configs.autosave"
|
|
|
|
end,
|
|
|
|
cond = function()
|
|
|
|
return require("core.utils").load_config().options.plugin.autosave == true
|
|
|
|
end,
|
|
|
|
}
|
|
|
|
|
|
|
|
use {
|
|
|
|
"lukas-reineke/indent-blankline.nvim",
|
|
|
|
disable = not plugin_status.blankline,
|
|
|
|
event = "BufRead",
|
|
|
|
config = function()
|
|
|
|
require("plugins.configs.others").blankline()
|
2021-08-16 03:49:09 -04:00
|
|
|
end,
|
|
|
|
}
|
2021-06-27 11:29:39 -04:00
|
|
|
|
2021-08-16 03:49:09 -04:00
|
|
|
use {
|
|
|
|
"norcalli/nvim-colorizer.lua",
|
2021-08-22 03:49:15 -04:00
|
|
|
disable = not plugin_status.colorizer,
|
2021-08-16 03:49:09 -04:00
|
|
|
event = "BufRead",
|
|
|
|
config = function()
|
2021-08-22 03:49:15 -04:00
|
|
|
require("plugins.configs.others").colorizer()
|
2021-08-16 03:49:09 -04:00
|
|
|
end,
|
|
|
|
}
|
2021-06-01 14:28:24 -04:00
|
|
|
|
2021-08-16 03:49:09 -04:00
|
|
|
-- lsp stuff
|
|
|
|
use {
|
|
|
|
"nvim-treesitter/nvim-treesitter",
|
|
|
|
event = "BufRead",
|
|
|
|
config = function()
|
2021-08-22 03:49:15 -04:00
|
|
|
require "plugins.configs.treesitter"
|
2021-08-16 03:49:09 -04:00
|
|
|
end,
|
|
|
|
}
|
2021-06-25 12:06:13 -04:00
|
|
|
|
2021-08-16 03:49:09 -04:00
|
|
|
use {
|
|
|
|
"kabouzeid/nvim-lspinstall",
|
|
|
|
event = "BufRead",
|
|
|
|
}
|
2021-07-10 09:36:41 -04:00
|
|
|
|
2021-08-16 03:49:09 -04:00
|
|
|
use {
|
|
|
|
"neovim/nvim-lspconfig",
|
|
|
|
after = "nvim-lspinstall",
|
|
|
|
config = function()
|
2021-08-22 03:49:15 -04: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 03:49:09 -04:00
|
|
|
end,
|
|
|
|
}
|
2021-06-24 13:19:42 -04:00
|
|
|
|
2021-08-16 03:49:09 -04:00
|
|
|
use {
|
|
|
|
"onsails/lspkind-nvim",
|
|
|
|
disable = not plugin_status.lspkind,
|
|
|
|
event = "BufEnter",
|
|
|
|
config = function()
|
2021-08-22 03:49:15 -04:00
|
|
|
require("plugins.configs.others").lspkind()
|
2021-08-16 03:49:09 -04:00
|
|
|
end,
|
|
|
|
}
|
2021-06-25 22:01:15 -04:00
|
|
|
|
2021-08-16 03:49:09 -04:00
|
|
|
use {
|
2021-08-22 03:49:15 -04:00
|
|
|
"jdhao/better-escape.vim",
|
|
|
|
disable = not plugin_status.esc_insertmode,
|
|
|
|
event = "InsertEnter",
|
2021-08-16 03:49:09 -04:00
|
|
|
config = function()
|
2021-08-22 03:49:15 -04:00
|
|
|
require("plugins.configs.others").better_escape()
|
|
|
|
end,
|
|
|
|
setup = function()
|
|
|
|
require("core.mappings").better_escape()
|
2021-08-16 03:49:09 -04:00
|
|
|
end,
|
|
|
|
}
|
2021-08-07 01:55:23 -04:00
|
|
|
|
2021-08-16 03:49:09 -04:00
|
|
|
-- load compe in insert mode only
|
|
|
|
use {
|
|
|
|
"hrsh7th/nvim-compe",
|
|
|
|
event = "InsertEnter",
|
|
|
|
config = function()
|
2021-08-22 03:49:15 -04:00
|
|
|
require "plugins.configs.compe"
|
2021-08-16 03:49:09 -04:00
|
|
|
end,
|
|
|
|
wants = "LuaSnip",
|
|
|
|
requires = {
|
|
|
|
{
|
|
|
|
"L3MON4D3/LuaSnip",
|
|
|
|
wants = "friendly-snippets",
|
|
|
|
event = "InsertCharPre",
|
2021-06-25 22:27:09 -04:00
|
|
|
config = function()
|
2021-08-22 03:49:15 -04:00
|
|
|
require "plugins.configs.luasnip"
|
2021-06-26 08:50:25 -04:00
|
|
|
end,
|
2021-08-16 03:49:09 -04:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"rafamadriz/friendly-snippets",
|
|
|
|
event = "InsertCharPre",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
2021-06-25 22:27:09 -04:00
|
|
|
|
2021-08-16 03:49:09 -04:00
|
|
|
-- misc plugins
|
|
|
|
use {
|
|
|
|
"windwp/nvim-autopairs",
|
|
|
|
after = "nvim-compe",
|
|
|
|
config = function()
|
2021-08-22 03:49:15 -04:00
|
|
|
require "plugins.configs.autopairs"
|
2021-08-16 03:49:09 -04:00
|
|
|
end,
|
|
|
|
}
|
2021-05-12 13:23:35 -04:00
|
|
|
|
2021-08-16 03:49:09 -04:00
|
|
|
use {
|
|
|
|
"andymass/vim-matchup",
|
|
|
|
disable = not plugin_status.vim_matchup,
|
|
|
|
event = "CursorMoved",
|
|
|
|
}
|
2021-06-25 22:24:10 -04:00
|
|
|
|
2021-08-22 03:49:15 -04:00
|
|
|
-- smooth scroll
|
2021-08-16 03:49:09 -04:00
|
|
|
use {
|
2021-08-22 03:49:15 -04:00
|
|
|
"karb94/neoscroll.nvim",
|
|
|
|
disable = not plugin_status.neoscroll,
|
|
|
|
event = "WinScrolled",
|
2021-08-16 03:49:09 -04:00
|
|
|
config = function()
|
2021-08-22 03:49:15 -04:00
|
|
|
require("plugins.configs.others").neoscroll()
|
2021-08-16 03:49:09 -04:00
|
|
|
end,
|
|
|
|
}
|
2021-06-15 06:25:32 -04:00
|
|
|
|
2021-08-16 03:49:09 -04:00
|
|
|
use {
|
|
|
|
"glepnir/dashboard-nvim",
|
2021-08-22 03:49:15 -04:00
|
|
|
disable = not plugin_status.dashboard,
|
2021-08-16 03:49:09 -04:00
|
|
|
cmd = {
|
|
|
|
"Dashboard",
|
|
|
|
"DashboardNewFile",
|
|
|
|
"DashboardJumpMarks",
|
|
|
|
"SessionLoad",
|
|
|
|
"SessionSave",
|
|
|
|
},
|
2021-08-22 03:49:15 -04:00
|
|
|
config = function()
|
|
|
|
require "plugins.configs.dashboard"
|
|
|
|
end,
|
2021-08-16 03:49:09 -04:00
|
|
|
setup = function()
|
2021-08-22 03:49:15 -04:00
|
|
|
require("core.mappings").dashboard()
|
2021-08-16 03:49:09 -04:00
|
|
|
end,
|
|
|
|
}
|
2021-06-25 22:10:23 -04:00
|
|
|
|
2021-08-16 03:49:09 -04:00
|
|
|
use {
|
2021-08-22 03:49:15 -04: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 03:49:09 -04:00
|
|
|
config = function()
|
2021-08-22 03:49:15 -04:00
|
|
|
require("plugins.configs.others").comment()
|
2021-08-16 03:49:09 -04:00
|
|
|
end,
|
2021-08-22 03:49:15 -04:00
|
|
|
setup = function()
|
|
|
|
require("core.mappings").comment()
|
2021-08-16 03:49:09 -04:00
|
|
|
end,
|
|
|
|
}
|
2021-06-24 13:21:39 -04:00
|
|
|
|
2021-08-22 03:49:15 -04:00
|
|
|
-- file managing , picker etc
|
2021-08-16 03:49:09 -04:00
|
|
|
use {
|
2021-08-22 03:49:15 -04:00
|
|
|
"kyazdani42/nvim-tree.lua",
|
|
|
|
cmd = "NvimTreeToggle",
|
2021-08-16 03:49:09 -04:00
|
|
|
config = function()
|
2021-08-22 03:49:15 -04:00
|
|
|
require "plugins.configs.nvimtree"
|
|
|
|
end,
|
|
|
|
setup = function()
|
|
|
|
require("core.mappings").nvimtree()
|
2021-08-16 03:49:09 -04:00
|
|
|
end,
|
|
|
|
}
|
2021-06-25 22:22:48 -04:00
|
|
|
|
2021-08-16 03:49:09 -04:00
|
|
|
use {
|
|
|
|
"Pocco81/TrueZen.nvim",
|
2021-08-22 03:49:15 -04:00
|
|
|
disable = not plugin_status.truezen,
|
2021-08-16 03:49:09 -04:00
|
|
|
cmd = {
|
|
|
|
"TZAtaraxis",
|
|
|
|
"TZMinimalist",
|
|
|
|
"TZFocus",
|
|
|
|
},
|
|
|
|
config = function()
|
2021-08-22 03:49:15 -04:00
|
|
|
require "plugins.configs.zenmode"
|
2021-08-16 03:49:09 -04:00
|
|
|
end,
|
|
|
|
setup = function()
|
2021-08-22 03:49:15 -04:00
|
|
|
require("core.mappings").truezen()
|
2021-08-16 03:49:09 -04:00
|
|
|
end,
|
|
|
|
}
|
2021-07-23 13:22:09 -04:00
|
|
|
|
2021-08-16 03:49:09 -04:00
|
|
|
use {
|
|
|
|
"tpope/vim-fugitive",
|
|
|
|
disable = not plugin_status.vim_fugitive,
|
|
|
|
cmd = {
|
|
|
|
"Git",
|
|
|
|
},
|
|
|
|
setup = function()
|
2021-08-22 03:49:15 -04:00
|
|
|
require("core.mappings").vim_fugitive()
|
2021-08-16 03:49:09 -04:00
|
|
|
end,
|
|
|
|
}
|
|
|
|
end)
|