Skip to content

Commit

Permalink
fix: fix incorrect mapping resolution order
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Jul 12, 2024
1 parent fdf75aa commit 83e48bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lua/astrolsp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,12 @@ M.on_attach = function(client, bufnr)
map_opts = assert(vim.tbl_deep_extend("force", map_opts, { buffer = bufnr }))
map_opts[1], map_opts.cond = nil, nil
end
if not rhs and wk_avail then
if rhs then
vim.keymap.set(mode, lhs, rhs, map_opts --[[@as vim.keymap.set.Opts]])
elseif wk_avail then
map_opts[1], map_opts.mode = lhs, mode
if not map_opts.group then map_opts.group = map_opts.desc end
wk.add(map_opts)
else
vim.keymap.set(mode, lhs, rhs, map_opts --[[@as vim.keymap.set.Opts]])
end
end
end
Expand Down

0 comments on commit 83e48bc

Please sign in to comment.