Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Feature/LanguageSupport/Feature_LanguageSupport.re
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ module Msg = {
module Hover = {
let show = Hover(Hover.(Command(Show)));

let scrollDown = Hover(Hover.(Command(ScrollDown)));

let scrollDown = Hover(Hover.(Command(ScrollUp)));

let mouseHovered = location => Hover(Hover.MouseHovered(location));
let mouseMoved = location => Hover(Hover.MouseMoved(location));

Expand Down
25 changes: 23 additions & 2 deletions src/Feature/LanguageSupport/Hover.re
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ module IDGenerator =

[@deriving show({with_path: false})]
type command =
| Show;
| Show
| ScrollDown
| ScrollUp;

[@deriving show({with_path: false})]
type msg =
Expand Down Expand Up @@ -140,6 +142,8 @@ let update =
msg,
) =>
switch (msg) {
| Command(ScrollDown)
| Command(ScrollUp)
| Command(Show) =>
switch (maybeBuffer) {
| Some(buffer) =>
Expand Down Expand Up @@ -280,10 +284,27 @@ module Commands = {
"editor.action.showHover",
Command(Show),
);

let scrollDown =
define(
~category="Hover",
~title="Scroll down",
"editor.action.scrollHoverDown",
Command(ScrollDown)
)


let scrollUp =
define(
~category="Hover",
~title="Scroll up",
"editor.action.scrollHoverUp",
Command(ScrollUp)
)
};

module Contributions = {
let commands = Commands.[show];
let commands = Commands.[show, scrollDown, scrollUp];
};

module Styles = {
Expand Down