Skip to content

Handle more class and object-related cases in the hover filtering.#1599

Merged
voodoos merged 5 commits intoocaml:masterfrom
voodoos:hover-classes
Mar 31, 2026
Merged

Handle more class and object-related cases in the hover filtering.#1599
voodoos merged 5 commits intoocaml:masterfrom
voodoos:hover-classes

Conversation

@voodoos
Copy link
Copy Markdown
Collaborator

@voodoos voodoos commented Mar 31, 2026

Behavior is still imperfect but that's a merlin issue: type enclosing returns nothing when hovering over c in class c = object ... end

It's a step towards fixing #1587 but there is also work needed on Merlin, some of these type-enclosing request still return nothing.

I also enabled hovering hover records's curly brackets in expressions

voodoos added 2 commits March 31, 2026 11:31
Behavior is still imperfect but that's a merlin issue: type enclosing returns nothing when hovering over `c` in `class c = object ... end`
@voodoos voodoos merged commit 96830d5 into ocaml:master Mar 31, 2026
4 of 6 checks passed
voodoos added a commit to voodoos/opam-repository that referenced this pull request Apr 9, 2026
CHANGES:

## Features

- Add custom [`ocamllsp/refactorExtract`](https://github.com/ocaml/ocaml-lsp/blob/ocaml-lsp-server/docs/ocamllsp/refactorExtract-spec.md) request (ocaml/ocaml-lsp#1545)
- Add `destruct` custom request (ocaml/ocaml-lsp#1583)
- Add `locate_types` custom request (ocaml/ocaml-lsp#1584)
- Add support for the `textDocument/rangeFormatting` request (ocaml/ocaml-lsp#1591)
- Allow to configure merlin using build systems other than dune.
  If `$OCAMLLSP_PROJECT_BUILD_SYSTEM` environment variable is set then OCaml
  LSP will execute `$OCAMLLSP_PROJECT_BUILD_SYSTEM ocaml-merlin` command to get
  merlin configuration for a module. It is expected the command to communicate
  using `merlin-dot-protocol`.
  If `$OCAMLLSP_PROJECT_ROOT` environment variable is set then OCaml LSP will
  use it as a project root directory.

## Fixes

- Enable "hover" on more locations, notably class and object related (ocaml/ocaml-lsp#1599)
voodoos added a commit to voodoos/opam-repository that referenced this pull request Apr 9, 2026
CHANGES:

## Features

- Add custom [`ocamllsp/refactorExtract`](https://github.com/ocaml/ocaml-lsp/blob/ocaml-lsp-server/docs/ocamllsp/refactorExtract-spec.md) request (ocaml/ocaml-lsp#1545)
- Add `destruct` custom request (ocaml/ocaml-lsp#1583)
- Add `locate_types` custom request (ocaml/ocaml-lsp#1584)
- Add support for the `textDocument/rangeFormatting` request (ocaml/ocaml-lsp#1591)
- Allow to configure merlin using build systems other than dune.
  If `$OCAMLLSP_PROJECT_BUILD_SYSTEM` environment variable is set then OCaml
  LSP will execute `$OCAMLLSP_PROJECT_BUILD_SYSTEM ocaml-merlin` command to get
  merlin configuration for a module. It is expected the command to communicate
  using `merlin-dot-protocol`.
  If `$OCAMLLSP_PROJECT_ROOT` environment variable is set then OCaml LSP will
  use it as a project root directory.

## Fixes

- Enable "hover" on more locations, notably class and object related (ocaml/ocaml-lsp#1599)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant