mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
fix(toggle): M.wk should not add description if there's a LazyKeysHandler present
This commit is contained in:
parent
cb40a09538
commit
63b3e6d032
1 changed files with 6 additions and 0 deletions
|
|
@ -39,9 +39,15 @@ function M.map(lhs, toggle)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.wk(lhs, toggle)
|
function M.wk(lhs, toggle)
|
||||||
|
local keys = require("lazy.core.handler").handlers.keys
|
||||||
|
---@cast keys LazyKeysHandler
|
||||||
|
|
||||||
if not LazyVim.has("which-key.nvim") then
|
if not LazyVim.has("which-key.nvim") then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
if keys.have and keys:have(lhs, "n") then
|
||||||
|
return
|
||||||
|
end
|
||||||
local function safe_get()
|
local function safe_get()
|
||||||
local ok, enabled = pcall(toggle.get)
|
local ok, enabled = pcall(toggle.get)
|
||||||
if not ok then
|
if not ok then
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue