Skip to content

Commit

Permalink
feat(config): preview symbol on mouse hovering
Browse files Browse the repository at this point in the history
  • Loading branch information
bekaboo committed Jun 9, 2023
1 parent 3882ee3 commit 5ec3fa0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lua/dropbar/configs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,18 @@ M.opts = {
end
local mouse = vim.fn.getmousepos()
if mouse.winid ~= menu.win then
-- Find the root menu
while menu and menu.prev_menu do
menu = menu.prev_menu
end
if menu then
menu:finish_preview(true)
end
return
end
if M.opts.symbol.preview.enable then
menu:preview_symbol_at({ mouse.line, mouse.column })
end
menu:update_hover_hl({ mouse.line, mouse.column - 1 })
end,
},
Expand Down

0 comments on commit 5ec3fa0

Please sign in to comment.