[new release] lsp (3 packages) (1.18.0) #26202
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
LSP protocol implementation in OCaml
CHANGES:
Features
Introduce a configuration option to control dune diagnostics. The option is
called
duneDiganostics
and it may be set to{ enable: false }
to disablediagnostics. (Add flag to disable dune diagnostics ocaml-lsp#1221)
Support folding of
ifthenelse
expressions (feat(ocamllsp): support Pexp_ifthenelse folding ranges ocaml-lsp#1031)Improve hover behavior (Improving hover behavior ocaml-lsp#1245)
Hovers are no longer displaye on useless parsetree nodes such as keywords,
comments, etc.
Multiline hovers are now filtered away.
Display expanded ppx's in the hover window.
Improve document symbols (Improved document symbols ocaml-lsp#1247)
Use the parse tree instead of the typed tree. This means that document
symbols will work even if the source code doesn't type check.
Include symbols at arbitrary depth.
Differentiate functions / types / variants / etc.
This now includes PPXs like
let%expect_test
orlet%bench
in the outline.Introduce a
destruct-line
code action. This is an improved version of theold
destruct
code action. (Add new destruct-line code action ocaml-lsp#1283)Improve signature inference to only include types for elements that were
absent from the signature. Previously, all signature items would always be
inserted. (Improve the infer-interface code action and add an update-signature code action ocaml-lsp#1289)
Add an
update-signature
code action to update the types of elements thatwere already present in the signature (Improve the infer-interface code action and add an update-signature code action ocaml-lsp#1289)
Add custom
ocamllsp/merlinCallCompatible
request (Add a custom query for raw invocation of Merlin ocaml-lsp#1265)
Add custom
ocamllsp/typeEnclosing
request (Type enclosing query ocaml-lsp#1304)Fixes
Detect document kind by looking at merlin's
suffixes
config.This enables more lsp features for non-.ml/.mli files. Though it still
depends on merlin's support. (refactor: get doc kind info from merlin ocaml-lsp#1237)
Correctly accept the
--clientProcessId
flag. (fix clientProcessId typo ocaml-lsp#1242)Disable automatic completion and signature help inside comments (Disable trigger-character completions and signature help in comments ocaml-lsp#1246)
Includes a new optional/configurable option to toggle syntax documentation. If
toggled on, allows display of syntax documentation on hover tooltips. Can be
controlled via environment variables and by GUI for VS code. (Demystifying OCaml Syntax with Merlin and OCaml-LSP ocaml-lsp#1218)
For completions on labels that the LSP gets from merlin, take into account
whether the prefix being completed starts with
~
or?
. Change the labelcompletions that start with
?
to start with~
when the prefix beingcompleted starts with
~
. (respect completion prefix when completing optional arguments ocaml-lsp#1277)Fix document syncing (Fix abs_pos computing in
String_zipper.drop_until
ocaml-lsp#1278, fix(lsp): goto_line_backward abs_pos ocaml-lsp#1280, fixes Text_document has bugs when performing updates and getting positions ocaml-lsp#1207)Stop generating inlay hints on generated code (Disable inlay hints under ghost location ocaml-lsp#1290)
Fix parenthesizing of function types in
SignatureHelp
(Fix parens around function types in signature help ocaml-lsp#1296)Fix syntax documentation rendering (hover: use
***
to print dividers. ocaml-lsp#1318)