diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 5c1b67050..99cdd9ef4 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -23,16 +23,16 @@ jobs: ocaml-compiler: - 4.14.x - 5.0.x - - ocaml-variants.5.1.0+trunk + - 5.1.x exclude: - os: windows-latest ocaml-compiler: 5.0.x - os: windows-latest - ocaml-compiler: ocaml-variants.5.1.0+trunk + ocaml-compiler: 5.1.x - os: macos-latest ocaml-compiler: 5.0.x - os: macos-latest - ocaml-compiler: ocaml-variants.5.1.0+trunk + ocaml-compiler: 5.1.x runs-on: ${{ matrix.os }} diff --git a/CHANGES.md b/CHANGES.md index 71aa5b7c9..cd56f9d57 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,8 @@ - Do not invoke dune at all if `--fallback-read-dot-merlin` flag is on. (#1173) - Fix semantic highlighting of infix operators that contain '.'. (#1186) - Disable highlighting unit as an enum member to fix comment highlighting bug. (#1185) +- Improve type-on-hover efficiency by only formatting the type of the first + enclosing. (#1191) ## Features diff --git a/ocaml-lsp-server/src/document.ml b/ocaml-lsp-server/src/document.ml index e7fd676ad..4bbcf81e5 100644 --- a/ocaml-lsp-server/src/document.ml +++ b/ocaml-lsp-server/src/document.ml @@ -289,7 +289,7 @@ module Merlin = struct let type_enclosing doc pos verbosity = with_pipeline_exn doc (fun pipeline -> - let command = Query_protocol.Type_enclosing (None, pos, None) in + let command = Query_protocol.Type_enclosing (None, pos, Some 0) in let pipeline = match verbosity with | 0 -> pipeline