diff --git a/src/Feature/LanguageSupport/Feature_LanguageSupport.re b/src/Feature/LanguageSupport/Feature_LanguageSupport.re index 10618913e9..30fb732242 100644 --- a/src/Feature/LanguageSupport/Feature_LanguageSupport.re +++ b/src/Feature/LanguageSupport/Feature_LanguageSupport.re @@ -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)); diff --git a/src/Feature/LanguageSupport/Hover.re b/src/Feature/LanguageSupport/Hover.re index d732e89e14..815e95b45c 100644 --- a/src/Feature/LanguageSupport/Hover.re +++ b/src/Feature/LanguageSupport/Hover.re @@ -66,7 +66,9 @@ module IDGenerator = [@deriving show({with_path: false})] type command = - | Show; + | Show + | ScrollDown + | ScrollUp; [@deriving show({with_path: false})] type msg = @@ -140,6 +142,8 @@ let update = msg, ) => switch (msg) { + | Command(ScrollDown) + | Command(ScrollUp) | Command(Show) => switch (maybeBuffer) { | Some(buffer) => @@ -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 = {