mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-21 02:55:09 +02:00
[SETTINGS] Ensure <Leader> is mapped before plugin configs are sourced. (#863)
This commit is contained in:
parent
f2e4f540a3
commit
afe079d821
2 changed files with 7 additions and 9 deletions
|
@ -8,15 +8,6 @@ end
|
||||||
|
|
||||||
which_key.setup(O.plugin.which_key.setup)
|
which_key.setup(O.plugin.which_key.setup)
|
||||||
|
|
||||||
-- Set leader
|
|
||||||
if O.leader_key == " " or O.leader_key == "space" then
|
|
||||||
vim.api.nvim_set_keymap("n", "<Space>", "<NOP>", { noremap = true, silent = true })
|
|
||||||
vim.g.mapleader = " "
|
|
||||||
else
|
|
||||||
vim.api.nvim_set_keymap("n", O.leader_key, "<NOP>", { noremap = true, silent = true })
|
|
||||||
vim.g.mapleader = O.leader_key
|
|
||||||
end
|
|
||||||
|
|
||||||
local opts = O.plugin.which_key.opts
|
local opts = O.plugin.which_key.opts
|
||||||
local vopts = O.plugin.which_key.vopts
|
local vopts = O.plugin.which_key.vopts
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,13 @@ local disabled_built_ins = {
|
||||||
"spellfile_plugin",
|
"spellfile_plugin",
|
||||||
-- 'matchit', 'matchparen', 'shada_plugin',
|
-- 'matchit', 'matchparen', 'shada_plugin',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if O.leader_key == " " or O.leader_key == "space" then
|
||||||
|
vim.g.mapleader = ' '
|
||||||
|
else
|
||||||
|
vim.g.mapleader = O.leader_key
|
||||||
|
end
|
||||||
|
|
||||||
for _, plugin in pairs(disabled_built_ins) do
|
for _, plugin in pairs(disabled_built_ins) do
|
||||||
vim.g["loaded_" .. plugin] = 1
|
vim.g["loaded_" .. plugin] = 1
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue