rust-tools.nvim icon indicating copy to clipboard operation
rust-tools.nvim copied to clipboard

feat: add keymaps option for scrolling the hover window

Open zuoxinyu opened this issue 3 years ago • 0 comments

Description

Add keymaps for scrolling the hover window without entering it (e.g. by press shift-K twice to enter it), just like the behavior in nvim-cmp. It's disabled by default, cause <c-j>/<c-k> might confilict with users' keymappings.

  • Add an option in the config to enable and custom the keymaps
    -- keymaps for scrolling the hover window
    keymaps = {
      -- enable the keymaps
      -- default: false
      enable = false,
      -- scroll up
      -- default: "<c-j>"
      scroll_up = "<c-j>",
      -- scroll down
      -- default: "<c-k>"
      scroll_down = "<c-k>",
    },
    
  • Add and expose a method scroll_hover(number) for the hover_actions module.

zuoxinyu avatar May 04 '22 14:05 zuoxinyu