add : option to load autopairs sequentially (#584)

navigator
siduck 3 years ago
parent 4b2bbe5d1c
commit c5fe1f711e

@ -75,6 +75,7 @@ M.plugins = {
autopairs = true,
},
options = {
autopairs = { loadAfter = "nvim-cmp" },
lspconfig = {
setup_lspconf = "", -- path of file containing setups of different lsps
},

@ -7,7 +7,7 @@ end
local use = packer.use
return packer.startup(function()
local status = require("core.utils").load_config().plugins.status
local plugin_settings = require("core.utils").load_config().plugins
-- FUNCTION: override_req, use `chadrc` plugin config override if present
-- name = name inside `default_config` / `chadrc`
@ -64,14 +64,14 @@ return packer.startup(function()
use {
"famiu/feline.nvim",
disable = not status.feline,
disable = not plugin_settings.status.feline,
after = "nvim-web-devicons",
config = override_req("feline", "plugins.configs.statusline"),
}
use {
"akinsho/bufferline.nvim",
disable = not status.bufferline,
disable = not plugin_settings.status.bufferline,
after = "nvim-web-devicons",
config = override_req("bufferline", "plugins.configs.bufferline"),
setup = function()
@ -81,14 +81,14 @@ return packer.startup(function()
use {
"lukas-reineke/indent-blankline.nvim",
disable = not status.blankline,
disable = not plugin_settings.status.blankline,
event = "BufRead",
config = override_req("indent_blankline", "(plugins.configs.others).blankline()"),
}
use {
"norcalli/nvim-colorizer.lua",
disable = not status.colorizer,
disable = not plugin_settings.status.colorizer,
event = "BufRead",
config = override_req("nvim_colorizer", "(plugins.configs.others).colorizer()"),
}
@ -103,7 +103,7 @@ return packer.startup(function()
-- git stuff
use {
"lewis6991/gitsigns.nvim",
disable = not status.gitsigns,
disable = not plugin_settings.status.gitsigns,
opt = true,
config = override_req("gitsigns", "plugins.configs.gitsigns"),
setup = function()
@ -128,14 +128,14 @@ return packer.startup(function()
use {
"ray-x/lsp_signature.nvim",
disable = not status.lspsignature,
disable = not plugin_settings.status.lspsignature,
after = "nvim-lspconfig",
config = override_req("signature", "(plugins.configs.others).signature()"),
}
use {
"andymass/vim-matchup",
disable = not status.vim_matchup,
disable = not plugin_settings.status.vim_matchup,
opt = true,
setup = function()
require("core.utils").packer_lazy_load "vim-matchup"
@ -144,7 +144,7 @@ return packer.startup(function()
use {
"max397574/better-escape.nvim",
disable = not status.esc_insertmode,
disable = not plugin_settings.status.esc_insertmode,
event = "InsertEnter",
config = override_req("better_escape", "(plugins.configs.others).better_escape()"),
}
@ -153,20 +153,20 @@ return packer.startup(function()
use {
"rafamadriz/friendly-snippets",
disable = not status.cmp,
disable = not plugin_settings.status.cmp,
event = "InsertEnter",
}
use {
"hrsh7th/nvim-cmp",
disable = not status.cmp,
disable = not plugin_settings.status.cmp,
after = "friendly-snippets",
config = override_req("nvim_cmp", "plugins.configs.cmp"),
}
use {
"L3MON4D3/LuaSnip",
disable = not status.cmp,
disable = not plugin_settings.status.cmp,
wants = "friendly-snippets",
after = "nvim-cmp",
config = override_req("luasnip", "(plugins.configs.others).luasnip()"),
@ -174,44 +174,44 @@ return packer.startup(function()
use {
"saadparwaiz1/cmp_luasnip",
disable = not status.cmp,
disable = not plugin_settings.status.cmp,
after = "LuaSnip",
}
use {
"hrsh7th/cmp-nvim-lua",
disable = not status.cmp,
disable = not plugin_settings.status.cmp,
after = "cmp_luasnip",
}
use {
"hrsh7th/cmp-nvim-lsp",
disable = not status.cmp,
disable = not plugin_settings.status.cmp,
after = "cmp-nvim-lua",
}
use {
"hrsh7th/cmp-buffer",
disable = not status.cmp,
disable = not plugin_settings.status.cmp,
after = "cmp-nvim-lsp",
}
use {
"hrsh7th/cmp-path",
disable = not status.cmp,
disable = not plugin_settings.status.cmp,
after = "cmp-buffer",
}
-- misc plugins
use {
"windwp/nvim-autopairs",
disable = not status.autopairs,
after = "nvim-cmp",
disable = not plugin_settings.status.autopairs,
after = plugin_settings.options.autopairs.loadAfter,
config = override_req("nvim_autopairs", "(plugins.configs.others).autopairs()"),
}
use {
"glepnir/dashboard-nvim",
disable = not status.dashboard,
disable = not plugin_settings.status.dashboard,
config = override_req("dashboard", "plugins.configs.dashboard"),
setup = function()
require("core.mappings").dashboard()
@ -220,7 +220,7 @@ return packer.startup(function()
use {
"terrortylor/nvim-comment",
disable = not status.comment,
disable = not plugin_settings.status.comment,
cmd = "CommentToggle",
config = override_req("nvim_comment", "(plugins.configs.others).comment()"),
setup = function()
@ -231,7 +231,7 @@ return packer.startup(function()
-- file managing , picker etc
use {
"kyazdani42/nvim-tree.lua",
disable = not status.nvimtree,
disable = not plugin_settings.status.nvimtree,
cmd = { "NvimTreeToggle", "NvimTreeFocus" },
config = override_req("nvim_tree", "plugins.configs.nvimtree"),
setup = function()
@ -250,7 +250,7 @@ return packer.startup(function()
},
{
"nvim-telescope/telescope-media-files.nvim",
disable = not status.telescope_media,
disable = not plugin_settings.status.telescope_media,
setup = function()
require("core.mappings").telescope_media()
end,

Loading…
Cancel
Save