2021-08-12 07:58:03 -04:00
|
|
|
local plugin_status = require("chadrc").plugin_status
|
|
|
|
|
2021-07-17 07:14:52 -04:00
|
|
|
local present, _ = pcall(require, "packerInit")
|
2021-07-18 20:58:28 -04:00
|
|
|
local packer
|
2021-07-17 07:14:52 -04:00
|
|
|
|
|
|
|
if present then
|
2021-07-15 11:46:45 -04:00
|
|
|
packer = require "packer"
|
|
|
|
else
|
|
|
|
return false
|
|
|
|
end
|
|
|
|
|
|
|
|
local use = packer.use
|
2021-07-08 23:44:04 -04:00
|
|
|
|
2021-06-14 10:25:41 -04:00
|
|
|
return packer.startup(
|
2021-03-12 20:23:02 -05:00
|
|
|
function()
|
2021-07-18 20:58:28 -04:00
|
|
|
use {
|
|
|
|
"wbthomason/packer.nvim",
|
|
|
|
event = "VimEnter"
|
|
|
|
}
|
2021-06-01 14:28:24 -04:00
|
|
|
|
2021-07-26 05:36:32 -04:00
|
|
|
use {
|
|
|
|
"jdhao/better-escape.vim",
|
2021-08-12 07:58:03 -04:00
|
|
|
disable = plugin_status.better_esc,
|
2021-07-26 05:36:32 -04:00
|
|
|
event = "InsertEnter",
|
|
|
|
config = function()
|
|
|
|
require "plugins.others".escape()
|
|
|
|
end
|
|
|
|
}
|
|
|
|
|
2021-07-18 20:58:28 -04:00
|
|
|
use {
|
|
|
|
"akinsho/nvim-bufferline.lua",
|
2021-08-12 07:58:03 -04:00
|
|
|
disable = plugin_status.nvim_bufferline,
|
2021-07-23 02:44:39 -04:00
|
|
|
after = "nvim-base16.lua",
|
|
|
|
config = function()
|
|
|
|
require "plugins.bufferline"
|
2021-08-12 07:58:03 -04:00
|
|
|
end,
|
|
|
|
setup = function()
|
|
|
|
require "mappings".bufferline()
|
2021-07-23 02:44:39 -04:00
|
|
|
end
|
2021-07-18 20:58:28 -04:00
|
|
|
}
|
2021-07-08 23:44:04 -04:00
|
|
|
|
|
|
|
use {
|
|
|
|
"glepnir/galaxyline.nvim",
|
2021-08-12 07:58:03 -04:00
|
|
|
disable = plugin_status.galaxyline,
|
2021-07-18 12:41:52 -04:00
|
|
|
after = "nvim-base16.lua",
|
2021-07-08 23:44:04 -04:00
|
|
|
config = function()
|
2021-07-15 11:46:45 -04:00
|
|
|
require "plugins.statusline"
|
2021-07-08 23:44:04 -04:00
|
|
|
end
|
|
|
|
}
|
2021-06-25 22:27:09 -04:00
|
|
|
|
2021-04-20 00:15:14 -04:00
|
|
|
-- color related stuff
|
2021-07-18 12:41:52 -04:00
|
|
|
use {
|
|
|
|
"siduck76/nvim-base16.lua",
|
|
|
|
after = "packer.nvim",
|
|
|
|
config = function()
|
|
|
|
require "theme"
|
|
|
|
end
|
|
|
|
}
|
2021-06-27 11:29:39 -04:00
|
|
|
|
|
|
|
use {
|
|
|
|
"norcalli/nvim-colorizer.lua",
|
2021-08-12 07:58:03 -04:00
|
|
|
disable = plugin_status.nvim_colorizer,
|
2021-06-27 12:28:35 -04:00
|
|
|
event = "BufRead",
|
2021-06-27 11:29:39 -04:00
|
|
|
config = function()
|
2021-07-16 13:52:36 -04:00
|
|
|
require("plugins.others").colorizer()
|
2021-06-27 11:29:39 -04:00
|
|
|
end
|
|
|
|
}
|
2021-06-01 14:28:24 -04:00
|
|
|
|
2021-08-07 01:55:23 -04:00
|
|
|
-- lsp stuff
|
2021-06-25 12:06:13 -04:00
|
|
|
use {
|
|
|
|
"nvim-treesitter/nvim-treesitter",
|
|
|
|
event = "BufRead",
|
|
|
|
config = function()
|
2021-07-15 11:46:45 -04:00
|
|
|
require "plugins.treesitter"
|
2021-06-25 12:06:13 -04:00
|
|
|
end
|
|
|
|
}
|
|
|
|
|
2021-07-10 09:36:41 -04:00
|
|
|
use {
|
|
|
|
"kabouzeid/nvim-lspinstall",
|
2021-08-07 01:55:23 -04:00
|
|
|
event = "BufRead"
|
2021-07-10 09:36:41 -04:00
|
|
|
}
|
|
|
|
|
2021-06-24 13:19:42 -04:00
|
|
|
use {
|
2021-06-25 22:27:09 -04:00
|
|
|
"neovim/nvim-lspconfig",
|
2021-07-11 07:58:10 -04:00
|
|
|
after = "nvim-lspinstall",
|
2021-06-24 13:19:42 -04:00
|
|
|
config = function()
|
2021-07-15 11:46:45 -04:00
|
|
|
require "plugins.lspconfig"
|
2021-06-24 13:19:42 -04:00
|
|
|
end
|
|
|
|
}
|
|
|
|
|
2021-06-25 22:01:15 -04:00
|
|
|
use {
|
|
|
|
"onsails/lspkind-nvim",
|
2021-08-12 07:58:03 -04:00
|
|
|
disable = plugin_status.lspkind,
|
2021-08-01 00:39:51 -04:00
|
|
|
event = "BufEnter",
|
2021-06-25 22:01:15 -04:00
|
|
|
config = function()
|
2021-07-16 13:52:36 -04:00
|
|
|
require("plugins.others").lspkind()
|
2021-06-25 22:01:15 -04:00
|
|
|
end
|
|
|
|
}
|
|
|
|
|
2021-08-07 01:55:23 -04:00
|
|
|
use {
|
|
|
|
"ray-x/lsp_signature.nvim",
|
2021-08-12 07:58:03 -04:00
|
|
|
disable = plugin_status.lspsignature,
|
2021-08-07 06:03:10 -04:00
|
|
|
after = "nvim-lspconfig",
|
2021-08-07 01:55:23 -04:00
|
|
|
config = function()
|
|
|
|
require("plugins.others").signature()
|
|
|
|
end
|
|
|
|
}
|
|
|
|
|
2021-06-25 22:27:09 -04:00
|
|
|
-- load compe in insert mode only
|
|
|
|
use {
|
|
|
|
"hrsh7th/nvim-compe",
|
|
|
|
event = "InsertEnter",
|
|
|
|
config = function()
|
2021-07-15 11:46:45 -04:00
|
|
|
require "plugins.compe"
|
2021-06-26 08:50:25 -04:00
|
|
|
end,
|
2021-07-18 20:58:28 -04:00
|
|
|
wants = "LuaSnip",
|
2021-06-26 08:50:25 -04:00
|
|
|
requires = {
|
|
|
|
{
|
|
|
|
"L3MON4D3/LuaSnip",
|
|
|
|
wants = "friendly-snippets",
|
|
|
|
event = "InsertCharPre",
|
|
|
|
config = function()
|
2021-07-15 11:46:45 -04:00
|
|
|
require "plugins.luasnip"
|
2021-06-26 08:50:25 -04:00
|
|
|
end
|
|
|
|
},
|
2021-07-11 02:50:15 -04:00
|
|
|
{
|
|
|
|
"rafamadriz/friendly-snippets",
|
|
|
|
event = "InsertCharPre"
|
|
|
|
}
|
2021-06-26 08:50:25 -04:00
|
|
|
}
|
2021-06-25 22:27:09 -04:00
|
|
|
}
|
|
|
|
|
2021-07-18 20:58:28 -04:00
|
|
|
use {
|
|
|
|
"sbdchd/neoformat",
|
2021-08-12 07:58:03 -04:00
|
|
|
disable = plugin_status.neoformat,
|
|
|
|
cmd = "Neoformat",
|
|
|
|
setup = function()
|
|
|
|
require "mappings".neoformat()
|
|
|
|
end
|
2021-07-18 20:58:28 -04:00
|
|
|
}
|
2021-06-25 22:01:15 -04:00
|
|
|
|
2021-06-25 22:27:09 -04:00
|
|
|
-- file managing , picker etc
|
|
|
|
use {
|
|
|
|
"kyazdani42/nvim-tree.lua",
|
|
|
|
cmd = "NvimTreeToggle",
|
|
|
|
config = function()
|
2021-07-15 11:46:45 -04:00
|
|
|
require "plugins.nvimtree"
|
2021-08-12 07:58:03 -04:00
|
|
|
end,
|
|
|
|
setup = function()
|
|
|
|
require "mappings".nvimtree()
|
2021-07-08 23:44:04 -04:00
|
|
|
end
|
|
|
|
}
|
|
|
|
|
|
|
|
use {
|
|
|
|
"kyazdani42/nvim-web-devicons",
|
2021-07-18 12:41:52 -04:00
|
|
|
after = "nvim-base16.lua",
|
2021-07-08 23:44:04 -04:00
|
|
|
config = function()
|
2021-07-15 11:46:45 -04:00
|
|
|
require "plugins.icons"
|
2021-06-25 22:27:09 -04:00
|
|
|
end
|
|
|
|
}
|
|
|
|
|
2021-07-18 20:58:28 -04:00
|
|
|
use {
|
|
|
|
"nvim-lua/plenary.nvim",
|
|
|
|
event = "BufRead"
|
|
|
|
}
|
|
|
|
use {
|
|
|
|
"nvim-lua/popup.nvim",
|
|
|
|
after = "plenary.nvim"
|
|
|
|
}
|
2021-07-18 06:36:33 -04:00
|
|
|
|
2021-06-25 22:33:29 -04:00
|
|
|
use {
|
|
|
|
"nvim-telescope/telescope.nvim",
|
2021-06-26 08:50:25 -04:00
|
|
|
cmd = "Telescope",
|
2021-08-12 12:53:43 -04:00
|
|
|
requires = {
|
|
|
|
{
|
|
|
|
"nvim-telescope/telescope-fzf-native.nvim",
|
|
|
|
run = "make"
|
|
|
|
},
|
|
|
|
{
|
2021-08-14 03:30:01 -04:00
|
|
|
"nvim-telescope/telescope-media-files.nvim",
|
|
|
|
disable = plugin_status.telescope_media,
|
|
|
|
setup = function()
|
|
|
|
require "mappings".telescope_media()
|
|
|
|
end
|
2021-08-12 12:53:43 -04:00
|
|
|
}
|
|
|
|
},
|
2021-06-25 22:41:39 -04:00
|
|
|
config = function()
|
2021-07-15 11:46:45 -04:00
|
|
|
require "plugins.telescope"
|
2021-08-12 07:58:03 -04:00
|
|
|
end,
|
|
|
|
setup = function()
|
|
|
|
require "mappings".telescope()
|
2021-06-25 22:41:39 -04:00
|
|
|
end
|
2021-06-25 22:33:29 -04:00
|
|
|
}
|
2021-06-25 22:27:09 -04:00
|
|
|
|
2021-06-25 22:41:39 -04:00
|
|
|
-- git stuff
|
2021-06-25 22:15:42 -04:00
|
|
|
use {
|
|
|
|
"lewis6991/gitsigns.nvim",
|
2021-08-12 07:58:03 -04:00
|
|
|
disable = plugin_status.gitsigns,
|
2021-07-18 06:36:33 -04:00
|
|
|
after = "plenary.nvim",
|
2021-06-25 22:15:42 -04:00
|
|
|
config = function()
|
2021-07-15 11:46:45 -04:00
|
|
|
require "plugins.gitsigns"
|
2021-06-25 22:15:42 -04:00
|
|
|
end
|
|
|
|
}
|
|
|
|
|
2021-06-25 22:41:39 -04:00
|
|
|
-- misc plugins
|
2021-08-13 11:59:17 -04:00
|
|
|
use {
|
|
|
|
"akinsho/nvim-toggleterm.lua",
|
|
|
|
event = "BufWinEnter",
|
|
|
|
config = function()
|
|
|
|
require "plugins.toggleterm"
|
|
|
|
end,
|
|
|
|
setup = function()
|
|
|
|
require "mappings".toggleterm()
|
|
|
|
end
|
|
|
|
}
|
2021-06-25 13:36:17 -04:00
|
|
|
use {
|
|
|
|
"windwp/nvim-autopairs",
|
2021-07-05 13:57:41 -04:00
|
|
|
after = "nvim-compe",
|
2021-06-25 13:36:17 -04:00
|
|
|
config = function()
|
2021-07-15 11:46:45 -04:00
|
|
|
require "plugins.autopairs"
|
2021-06-25 13:36:17 -04:00
|
|
|
end
|
|
|
|
}
|
2021-05-12 13:23:35 -04:00
|
|
|
|
2021-07-18 20:58:28 -04:00
|
|
|
use {
|
|
|
|
"andymass/vim-matchup",
|
2021-08-12 07:58:03 -04:00
|
|
|
disable = plugin_status.vim_matchup,
|
2021-07-18 20:58:28 -04:00
|
|
|
event = "CursorMoved"
|
|
|
|
}
|
2021-06-25 22:24:10 -04:00
|
|
|
|
2021-06-25 22:20:10 -04:00
|
|
|
use {
|
|
|
|
"terrortylor/nvim-comment",
|
2021-08-12 07:58:03 -04:00
|
|
|
disable = plugin_status.nvim_comment,
|
2021-06-25 22:20:10 -04:00
|
|
|
cmd = "CommentToggle",
|
|
|
|
config = function()
|
2021-07-16 13:52:36 -04:00
|
|
|
require("plugins.others").comment()
|
2021-08-12 09:07:02 -04:00
|
|
|
end,
|
|
|
|
setup = function()
|
2021-08-12 07:58:03 -04:00
|
|
|
require "mappings".comment_nvim()
|
2021-06-25 22:20:10 -04:00
|
|
|
end
|
|
|
|
}
|
2021-06-15 06:25:32 -04:00
|
|
|
|
2021-06-25 22:10:23 -04:00
|
|
|
use {
|
|
|
|
"glepnir/dashboard-nvim",
|
2021-08-12 07:58:03 -04:00
|
|
|
disable = plugin_status.dashboard_nvim,
|
2021-06-25 22:10:23 -04:00
|
|
|
cmd = {
|
2021-06-25 22:41:39 -04:00
|
|
|
"Dashboard",
|
2021-06-25 22:10:23 -04:00
|
|
|
"DashboardNewFile",
|
2021-06-27 12:38:47 -04:00
|
|
|
"DashboardJumpMarks",
|
|
|
|
"SessionLoad",
|
|
|
|
"SessionSave"
|
2021-06-25 22:10:23 -04:00
|
|
|
},
|
|
|
|
setup = function()
|
2021-07-15 11:46:45 -04:00
|
|
|
require "plugins.dashboard"
|
2021-08-12 07:58:03 -04:00
|
|
|
require "mappings".dashboard()
|
2021-06-25 22:10:23 -04:00
|
|
|
end
|
|
|
|
}
|
|
|
|
|
2021-06-26 08:50:25 -04:00
|
|
|
-- load autosave only if its globally enabled
|
2021-06-24 13:21:39 -04:00
|
|
|
use {
|
2021-08-12 07:58:03 -04:00
|
|
|
disable = plugin_status.autosave_nvim,
|
2021-07-02 05:47:36 -04:00
|
|
|
"Pocco81/AutoSave.nvim",
|
|
|
|
config = function()
|
2021-07-15 11:46:45 -04:00
|
|
|
require "plugins.autosave"
|
2021-07-02 05:47:36 -04:00
|
|
|
end,
|
2021-06-24 13:21:39 -04:00
|
|
|
cond = function()
|
2021-07-02 05:47:36 -04:00
|
|
|
return vim.g.auto_save == true
|
2021-06-24 13:21:39 -04:00
|
|
|
end
|
|
|
|
}
|
|
|
|
|
2021-06-25 22:24:10 -04:00
|
|
|
-- smooth scroll
|
|
|
|
use {
|
|
|
|
"karb94/neoscroll.nvim",
|
2021-08-12 07:58:03 -04:00
|
|
|
disable = plugin_status.neoscroll_nvim,
|
2021-06-25 22:24:10 -04:00
|
|
|
event = "WinScrolled",
|
|
|
|
config = function()
|
2021-07-16 13:52:36 -04:00
|
|
|
require("plugins.others").neoscroll()
|
2021-06-25 22:24:10 -04:00
|
|
|
end
|
|
|
|
}
|
2021-06-25 22:22:48 -04:00
|
|
|
|
|
|
|
use {
|
2021-07-01 07:44:56 -04:00
|
|
|
"Pocco81/TrueZen.nvim",
|
2021-08-12 07:58:03 -04:00
|
|
|
disable = plugin_status.truezen_nvim,
|
2021-07-18 20:58:28 -04:00
|
|
|
cmd = {
|
|
|
|
"TZAtaraxis",
|
|
|
|
"TZMinimalist",
|
|
|
|
"TZFocus"
|
|
|
|
},
|
2021-06-25 22:22:48 -04:00
|
|
|
config = function()
|
2021-07-15 11:46:45 -04:00
|
|
|
require "plugins.zenmode"
|
2021-08-12 07:58:03 -04:00
|
|
|
end,
|
|
|
|
setup = function()
|
|
|
|
require "mappings".truezen()
|
2021-06-25 22:22:48 -04:00
|
|
|
end
|
|
|
|
}
|
|
|
|
|
2021-06-25 22:29:33 -04:00
|
|
|
-- use "alvan/vim-closetag" -- for html autoclosing tag
|
2021-06-25 22:13:35 -04:00
|
|
|
|
|
|
|
use {
|
|
|
|
"lukas-reineke/indent-blankline.nvim",
|
2021-08-12 07:58:03 -04:00
|
|
|
disable = plugin_status.blankline,
|
2021-06-25 22:13:35 -04:00
|
|
|
event = "BufRead",
|
|
|
|
setup = function()
|
2021-07-16 13:52:36 -04:00
|
|
|
require("plugins.others").blankline()
|
2021-06-25 22:13:35 -04:00
|
|
|
end
|
|
|
|
}
|
2021-07-23 13:22:09 -04:00
|
|
|
|
|
|
|
use {
|
|
|
|
"tpope/vim-fugitive",
|
2021-08-12 07:58:03 -04:00
|
|
|
disable = plugin_status.vim_fugitive,
|
2021-07-23 13:22:09 -04:00
|
|
|
cmd = {
|
2021-07-26 05:36:32 -04:00
|
|
|
"Git"
|
2021-08-12 07:58:03 -04:00
|
|
|
},
|
|
|
|
setup = function()
|
|
|
|
require "mappings".fugitive()
|
|
|
|
end
|
2021-07-23 13:22:09 -04:00
|
|
|
}
|
2021-07-08 23:44:04 -04:00
|
|
|
end
|
2021-03-12 20:23:02 -05:00
|
|
|
)
|