Skip to content

Commit

Permalink
Only return first result for type_enclosing. (#1196)
Browse files Browse the repository at this point in the history
in `type-annotate` code action.
  • Loading branch information
voodoos authored Oct 3, 2023
1 parent 760f6a6 commit 672ca1b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +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)
- Improve type-on-hover and type-annotate efficiency by only formatting the type
of the first enclosing. (#1191, #1196)

## Features

Expand Down
2 changes: 1 addition & 1 deletion ocaml-lsp-server/src/code_actions/action_type_annotate.ml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ let code_action pipeline doc (params : CodeActionParams.t) =
match context with
| `Invalid -> None
| `Valid ->
let command = Query_protocol.Type_enclosing (None, pos_start, None) in
let command = Query_protocol.Type_enclosing (None, pos_start, Some 0) in
let config = Mpipeline.final_config pipeline in
let config =
{ config with query = { config.query with verbosity = Lvl 0 } }
Expand Down

0 comments on commit 672ca1b

Please sign in to comment.