Skip to content

Commit

Permalink
fix(hover)!: Enable title, improve keymaps setting.
Browse files Browse the repository at this point in the history
Signed-off-by: Guennadi Maximov C <[email protected]>
  • Loading branch information
DrKJeff16 committed Sep 5, 2024
1 parent 72e75cc commit 9622cc7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lua/plugin/hover/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Hover.setup({
border = 'rounded',
},
preview_window = true,
title = false,
title = true,
mouse_providers = { 'LSP' },
mouse_delay = 500,
})
Expand All @@ -61,25 +61,25 @@ local HOpts = {

---@type KeyMapDict
local Keys = {
['K'] = { Hover.hover, desc('Hover', true, HOpts.bufnr()) },
['gK'] = { Hover.hover_select, desc('Hover Select', true, HOpts.bufnr()) },
['K'] = { Hover.hover, desc('Hover') },
['gK'] = { Hover.hover_select, desc('Hover Select') },
['<C-p>'] = {
function() Hover.hover_switch('previous', HOpts) end,
desc('Previous Hover', true, HOpts.bufnr()),
desc('Previous Hover'),
},
['<C-n>'] = {
function() Hover.hover_switch('next', HOpts) end,
desc('Next Hover', true, HOpts.bufnr()),
desc('Next Hover'),
},
}

-- Mouse support (if mouse enabled)
if vim.opt.mouse:get()['a'] then
Keys['<MouseMove>'] = { Hover.hover_mouse, desc('Mouse Hover', true, HOpts.bufnr()) }
Keys['<MouseMove>'] = { Hover.hover_mouse, desc('Mouse Hover') }
vim.opt.mousemoveevent = true
end

map_dict(Keys, 'wk.register', false, 'n', HOpts.bufnr())
map_dict(Keys, 'wk.register', false, 'n')

--[[ -- Simple
require('hover').register {
Expand Down

0 comments on commit 9622cc7

Please sign in to comment.