Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify -index 0 in type-enclosing queries. #1191

Merged
merged 3 commits into from
Sep 26, 2023
Merged
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
6 changes: 3 additions & 3 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion ocaml-lsp-server/src/document.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down