|
2 | 2 |
|
3 | 3 | ## Features |
4 | 4 |
|
5 | | -- Add a new code action `Add missing rec keyword`, which is available when adding |
6 | | - a `rec` keyword can fix `Unbound value ...` error, e.g., |
| 5 | +- Add a new code action `Add missing rec keyword`, which is available when |
| 6 | + adding a `rec` keyword can fix `Unbound value ...` error, e.g., |
7 | 7 |
|
8 | 8 | ```ocaml |
9 | 9 | let fact n = if n = 0 then 1 else n * fact (n - 1) |
10 | 10 | (* ^^^^ Unbound value fact *) |
11 | 11 | ``` |
12 | 12 |
|
13 | | - Adding `rec` to the definition of `fact` will fix the problem. The new code action |
14 | | - offers adding `rec`. |
| 13 | + Adding `rec` to the definition of `fact` will fix the problem. The new code |
| 14 | + action offers adding `rec`. |
15 | 15 |
|
16 | | -- Jump to the first hole on calling `Destruct` code action (only with client VSCode OCaml |
17 | | - Platform) (#468) |
| 16 | +- Jump to the first hole on calling `Destruct` code action (only with client |
| 17 | + VSCode OCaml Platform) (#468) |
18 | 18 |
|
19 | | - Example: when a user invokes `Destruct` code action on `Some 1`, this code is replaced |
20 | | - by `match Some 1 with None -> _ | Some _ -> _`, where the 1st and 3rd underscores |
21 | | - are "typed holes", a concept created by Merlin to be able to put "holes" in OCaml code. |
| 19 | + Example: when a user invokes `Destruct` code action on `Some 1`, this code is |
| 20 | + replaced by `match Some 1 with None -> _ | Some _ -> _`, where the 1st and |
| 21 | + 3rd underscores are "typed holes", a concept created by Merlin to be able to |
| 22 | + put "holes" in OCaml code. |
22 | 23 |
|
23 | | - With this change, now for VSCode OCaml Platform users, on such invocation of `Destruct`, |
24 | | - the cursor will jump to the first typed hole and select it, so that user can start |
25 | | - editing right away. |
| 24 | + With this change, now for VSCode OCaml Platform users, on such invocation of |
| 25 | + `Destruct`, the cursor will jump to the first typed hole and select it, so |
| 26 | + that user can start editing right away. |
26 | 27 |
|
27 | 28 | - Use ocamlformat to properly format type snippets. This feature requires the |
28 | 29 | `ocamlformat-rpc` opam package to be installed. (#386) |
29 | 30 |
|
30 | | -- Add completion support for polymorphic variants, when it is possible to pin down the |
31 | | - precise type. Examples (`<|>` stands for the cursor) when completion will work (#473) |
| 31 | +- Add completion support for polymorphic variants, when it is possible to pin |
| 32 | + down the precise type. Examples (`<|>` stands for the cursor) when completion |
| 33 | + will work (#473) |
32 | 34 |
|
33 | 35 | Function application: |
34 | 36 |
|
|
44 | 46 | let a : [`Alpha | `Beta] = `B<|> |
45 | 47 | ``` |
46 | 48 |
|
47 | | - Note: this is actually a bug fix, since we were ignoring the backtick when constructing |
48 | | - the prefix for completion. |
| 49 | + Note: this is actually a bug fix, since we were ignoring the backtick when |
| 50 | + constructing the prefix for completion. |
49 | 51 |
|
50 | 52 | - Parse merlin errors (best effort) into a more structured form. This allows |
51 | 53 | reporting all locations as "related information" (#475) |
52 | 54 |
|
53 | | -- Add support for Merlin `Construct` command as completion suggestions, i.e., show complex |
54 | | - expressions that could complete the typed hole. (#472) |
| 55 | +- Add support for Merlin `Construct` command as completion suggestions, i.e., |
| 56 | + show complex expressions that could complete the typed hole. (#472) |
55 | 57 |
|
56 | | -- Add a code action `Construct an expression` that is shown when the cursor is at the end |
57 | | - of the typed hole, i.e., `_|`, where `|` is the cursor. The code action simply triggers |
58 | | - the client (currently only VS Code is supported) to show completion suggestions. (#472) |
| 58 | +- Add a code action `Construct an expression` that is shown when the cursor is |
| 59 | + at the end of the typed hole, i.e., `_|`, where `|` is the cursor. The code |
| 60 | + action simply triggers the client (currently only VS Code is supported) to |
| 61 | + show completion suggestions. (#472) |
59 | 62 |
|
60 | | -- Change the formatting-on-save error notification to a warning notification (#472) |
| 63 | +- Change the formatting-on-save error notification to a warning notification |
| 64 | + (#472) |
61 | 65 |
|
62 | 66 | - Code action to qualify ("put module name in identifiers") and unqualify |
63 | 67 | ("remove module name from identifiers") module names in identifiers (#399) |
|
90 | 94 | let f x = x.Unix.tms_stime, x.Unix.tms_utime |
91 | 95 | ``` |
92 | 96 |
|
93 | | -- Add support for a custom request `ocamllsp/wrappingAstNode`, which brings the smallest |
94 | | - AST (Abstract Syntax Tree) node enclosing given position. This request is used by VS |
95 | | - Code OCaml Platform and is not directly used by OCaml LSP users (#482) |
96 | | - |
97 | 97 | ## Fixes |
98 | 98 |
|
99 | 99 | - Do not show "random" documentation on hover |
|
105 | 105 |
|
106 | 106 | - Correctly rename a variable used as a named/optional argument (#478) |
107 | 107 |
|
108 | | -- When reporting an error at the beginning of the file, use the first line |
109 | | - not the second |
| 108 | +- When reporting an error at the beginning of the file, use the first line not |
| 109 | + the second (#489) |
110 | 110 |
|
111 | 111 | # 1.7.0 (07/28/2021) |
112 | 112 |
|
|
0 commit comments