mappings: Only set mappings if the plugin is enabled
format files fix some lsp warnings
This commit is contained in:
committed by
Sidhanth Rathod
parent
d7b97dfe63
commit
f4655e13ec
@@ -21,6 +21,12 @@ local plugins = {
|
||||
config = function()
|
||||
require("plugins.configs.others").nvchad_ui()
|
||||
end,
|
||||
setup = function()
|
||||
local load_override = require("core.utils").load_override
|
||||
if load_override({}, "NvChad/ui")["tabufline"]["enabled"] then
|
||||
require("core.utils").load_mappings "tabufline"
|
||||
end
|
||||
end,
|
||||
},
|
||||
|
||||
["NvChad/nvterm"] = {
|
||||
@@ -28,10 +34,13 @@ local plugins = {
|
||||
config = function()
|
||||
require "plugins.configs.nvterm"
|
||||
end,
|
||||
setup = function()
|
||||
require("core.utils").load_mappings "nvterm"
|
||||
end,
|
||||
},
|
||||
|
||||
["kyazdani42/nvim-web-devicons"] = {
|
||||
after = 'ui',
|
||||
after = "ui",
|
||||
module = "nvim-web-devicons",
|
||||
config = function()
|
||||
require("plugins.configs.others").devicons()
|
||||
@@ -42,6 +51,7 @@ local plugins = {
|
||||
opt = true,
|
||||
setup = function()
|
||||
require("core.lazy_load").on_file_open "indent-blankline.nvim"
|
||||
require("core.utils").load_mappings "blankline"
|
||||
end,
|
||||
config = function()
|
||||
require("plugins.configs.others").blankline()
|
||||
@@ -164,6 +174,9 @@ local plugins = {
|
||||
config = function()
|
||||
require("plugins.configs.others").comment()
|
||||
end,
|
||||
setup = function()
|
||||
require("core.utils").load_mappings "comment"
|
||||
end,
|
||||
},
|
||||
|
||||
-- file managing , picker etc
|
||||
@@ -173,6 +186,9 @@ local plugins = {
|
||||
config = function()
|
||||
require "plugins.configs.nvimtree"
|
||||
end,
|
||||
setup = function()
|
||||
require("core.utils").load_mappings "nvimtree"
|
||||
end,
|
||||
},
|
||||
|
||||
["nvim-telescope/telescope.nvim"] = {
|
||||
@@ -180,6 +196,9 @@ local plugins = {
|
||||
config = function()
|
||||
require "plugins.configs.telescope"
|
||||
end,
|
||||
setup = function()
|
||||
require("core.utils").load_mappings "telescope"
|
||||
end,
|
||||
},
|
||||
|
||||
-- Only load whichkey after all the gui
|
||||
@@ -188,6 +207,9 @@ local plugins = {
|
||||
config = function()
|
||||
require "plugins.configs.whichkey"
|
||||
end,
|
||||
setup = function()
|
||||
require("core.utils").load_mappings "whichkey"
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user