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:
Marty Oehme 2024-06-07 09:55:56 +02:00
parent 57f2fbd5fe
commit 4f67a6d3ca
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A
2 changed files with 6 additions and 2 deletions

View file

@ -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",