Skip to content

Tags: Alizter/ocaml-lsp

Tags

1.8.3

Toggle 1.8.3's commit message
Release 1.8.3

CHANGES:

- Fix debouncing of document updates. It was essentially complicated broken in
  all but the most trivial cases. (ocaml#509 fixes ocaml#504)

- Fix completion when passing named and functional arguments (ocaml#512)

1.8.2

Toggle 1.8.2's commit message
Release 1.8.2

CHANGES:

- Disable experimental dune support. It was accidentally left enabled.

lsp-1.8.2

Toggle lsp-1.8.2's commit message
Prepare 1.8.2

1.8.1

Toggle 1.8.1's commit message
Release 1.8.1

CHANGES:

- Update to latest merlin.

1.8.0

Toggle 1.8.0's commit message
Release 1.8.0

CHANGES:

- Add a new code action `Add missing rec keyword`, which is available when
  adding a `rec` keyword can fix `Unbound value ...` error, e.g.,

  ```ocaml
  let fact n = if n = 0 then 1 else n * fact (n - 1)
                                     (* ^^^^ Unbound value fact *)
  ```

  Adding `rec` to the definition of `fact` will fix the problem. The new code
  action offers adding `rec`.

- Use ocamlformat to properly format type snippets. This feature requires the
  `ocamlformat-rpc` opam package to be installed. (ocaml#386)

- Add completion support for polymorphic variants, when it is possible to pin
  down the precise type. Examples (`<|>` stands for the cursor) when completion
  will work (ocaml#473)

  Function application:

  ```
  let foo (a: [`Alpha | `Beta]) = ()

  foo `A<|>
  ```

  Type explicitly shown:

  ```
  let a : [`Alpha | `Beta] = `B<|>
  ```

  Note: this is actually a bug fix, since we were ignoring the backtick when
  constructing the prefix for completion.

- Parse merlin errors (best effort) into a more structured form. This allows
  reporting all locations as "related information" (ocaml#475)

- Add support for Merlin `Construct` command as completion suggestions, i.e.,
  show complex expressions that could complete the typed hole. (ocaml#472)

- Add a code action `Construct an expression` that is shown when the cursor is
  at the end of the typed hole, i.e., `_|`, where `|` is the cursor. The code
  action simply triggers the client (currently only VS Code is supported) to
  show completion suggestions. (ocaml#472)

- Change the formatting-on-save error notification to a warning notification
  (ocaml#472)

- Code action to qualify ("put module name in identifiers") and unqualify
  ("remove module name from identifiers") module names in identifiers (ocaml#399)

  Starting from:

  ```ocaml
  open Unix

  let times = Unix.times ()
  let f x = x.Unix.tms_stime, x.Unix.tms_utime
  ```

  Calling "remove module name from identifiers" with the cursor on the open
  statement will produce:

  ```ocaml
  open Unix

  let times = times ()
  let f x = x.tms_stime, x.tms_utime
  ```

  Calling "put module name in identifiers" will restore:

  ```ocaml
  open Unix

  let times = Unix.times ()
  let f x = x.Unix.tms_stime, x.Unix.tms_utime
  ```

- Do not show "random" documentation on hover

  - fixed by [merlin#1364](ocaml/merlin#1364)
  - fixes duplicate:
    - [ocaml-lsp#344](ocaml#344)
    - [vscode-ocaml-platform#111](ocamllabs/vscode-ocaml-platform#111)

- Correctly rename a variable used as a named/optional argument (ocaml#478)

- When reporting an error at the beginning of the file, use the first line not
  the second (ocaml#489)

1.7.0

Toggle 1.7.0's commit message
Distribution 1.7.0

CHANGES:

- Add sub-errors as "related" information in diagnostics (ocaml#457)

- Add support for navigating to a symbol inside a workspace (ocaml#398)

1.6.1

Toggle 1.6.1's commit message
Distribution 1.6.1

CHANGES:

- Switch `verbosity` from 1 to 0. This is the same default that merlin uses.
  The old value for verbosity (ocaml#433)

- Get fresh diagnostics (warning and error messages) on a file save (ocaml#438)

  Note: If you want the fresh diagnostics to take into account changes in other
  files, you likely need to rebuild your project. An easy way to get automatic
  rebuilds is to run `dune` in a watching mode, e.g.,[dune build --watch].

1.6.0

Toggle 1.6.0's commit message
Distribution 1.6.0

CHANGES:

- Code action to annotate a value with its type (ocaml#397)

- Fix interface/implementation switching on Windows (ocaml#427)

- Correctly parse project paths with spaces and other special characters that
  must be escaped.

- Print types with `-short-paths` even if the project wasn't built yet

1.5.0

Toggle 1.5.0's commit message
Distribution 1.5.0

1.4.1

Toggle 1.4.1's commit message
Distribution 1.4.1

CHANGES:

- Backport fixes from merlin (ocaml#382, ocaml#383)

- Encode request & notification `params` in a list. This is required by the
  spec. (ocaml#351)