Skip to content

Commit

Permalink
fix(keys): allow global/local ft keymaps to exist at the same time. F…
Browse files Browse the repository at this point in the history
…ixes #1241
  • Loading branch information
folke committed Jan 20, 2024
1 parent 747bb95 commit 5757b55
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lua/lazy/core/handler/keys.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ function M.parse(value, mode)
ret.mode = mode or "n"
ret.id = vim.api.nvim_replace_termcodes(ret.lhs, true, true, true)

if ret.ft then
local ft = type(ret.ft) == "string" and { ret.ft } or ret.ft --[[@as string[] ]]
ret.id = ret.id .. " (" .. table.concat(ft, ", ") .. ")"
end

if ret.mode ~= "n" then
ret.id = ret.id .. " (" .. ret.mode .. ")"
end
Expand Down

0 comments on commit 5757b55

Please sign in to comment.