Skip to content

Conversation

xvw
Copy link
Collaborator

@xvw xvw commented Apr 9, 2025

Adds triggerable support for inlay-hints for function parameters. The positive point is that we were disturbed by the ‘slightly non-deterministic’ support for inlay-hints, and this is in fact because since the change to the representation of function arguments, these were never taken into account. This PR also fixes this behaviour.

(cc @awilliambauer)

@xvw xvw requested a review from voodoos April 9, 2025 14:56
@xvw
Copy link
Collaborator Author

xvw commented Apr 9, 2025

Hmm CI failures seems weird.

@xvw xvw force-pushed the inlay-hint-function-params branch from f5dda59 to 1d424c8 Compare April 9, 2025 16:27
@xvw xvw force-pushed the inlay-hint-function-params branch from 97689f6 to 7e6ffc8 Compare April 9, 2025 17:46
@xvw
Copy link
Collaborator Author

xvw commented Apr 9, 2025

(the failure related to ocaml-lsp-compat is legit, see: ocaml/ocaml-lsp#1515)

Copy link
Collaborator

@voodoos voodoos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good to me. It a clear improvement and long-awaited fix.

@voodoos voodoos merged commit 1a58a66 into ocaml:main Apr 10, 2025
9 of 10 checks passed
@xvw xvw deleted the inlay-hint-function-params branch April 10, 2025 20:17
voodoos added a commit to voodoos/opam-repository that referenced this pull request Jun 23, 2025
CHANGES:

Mon Jun 23 10:10:42 CEST 2024

  + merlin library
    - Expose utilities to manipulate typed-holes in `Merlin_analysis.Typed_hole`
      (ocaml/merlin#1888)
    - `inlay-hints` fix inlay hints on function parameters (ocaml/merlin#1923)
    - Handle class type in outline (ocaml/merlin#1932)
    - Handle locally defined value in outline (ocaml/merlin#1936)
  + vim plugin
    - Added support for search-by-type (ocaml/merlin#1846)
      This is exposed through the existing `:MerlinSearch` command, that
      switches between search-by-type and polarity search depending on the
      first character of the query.
voodoos added a commit to voodoos/opam-repository that referenced this pull request Jun 24, 2025
CHANGES:

Tue Jun 24 16:10:42 CEST 2025

  + merlin library
    - Expose utilities to manipulate typed-holes in `Merlin_analysis.Typed_hole`
      (ocaml/merlin#1888)
    - `locate` can now disambiguate between files with identical names and contents
      (ocaml/merlin#1882)
    - `occurrences` now reports stale files (ocaml/merlin#1885)
    - `inlay-hints` fix inlay hints on function parameters (ocaml/merlin#1923)
    - Fix issues with ident validation and Lid comparison for occurrences (ocaml/merlin#1924)
    - Handle class type in outline (ocaml/merlin#1932)
    - Handle locally defined value in outline (ocaml/merlin#1936)
    - Fix a typer issue triggering assertions in the short-paths graph (ocaml/merlin#1935,
      fixes ocaml/merlin#1913)
    - Downstreamed a typer fix from 5.3.X that would trigger assertions linked
      to scopes bit masks when backtracking the typer cache (ocaml/merlin#1935)
    - Add a new selection field to outline results that contains the location of
      the symbol itself. (ocaml/merlin#1942)
    - Fix destruct hanging when printing patterns with (::). (ocaml/merlin#1944, fixes
      ocaml/ocaml-lsp#1489)
    - Reproduce and fix a handful of jump-to-definition (locate) issues  (ocaml/merlin#1930,
      fixes ocaml/merlin#1580 and ocaml/merlin#1588, workaround for ocaml/merlin#1934)
  + ocaml-index
    - Improve the granularity of index reading by segmenting the marshalization
      of the involved data-structures. (ocaml/merlin#1889)
  + test suite
    - Add a test case illustrating wrong open order proposed in issue ocaml/merlin#1900. (ocaml/merlin#1901)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants