nvim: Fix which-key conditional usage if not loaded
The only left-over which-key invocation which did not check for its existence beforehand.
This commit is contained in:
parent
57f2fbd5fe
commit
4f67a6d3ca
2 changed files with 6 additions and 2 deletions
|
|
@ -70,7 +70,9 @@ local function on_attach(client, bufnr)
|
|||
{ buffer = bufnr, desc = "Next error" }
|
||||
)
|
||||
|
||||
require("which-key").register({ ["<localleader>l"] = { name = "+language" } })
|
||||
if require("core.util").is_available("which-key") then
|
||||
require("which-key").register({ ["<localleader>l"] = { name = "+language" } })
|
||||
end
|
||||
map(
|
||||
"n",
|
||||
"<localleader>ld",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue