Skip to content

Commit e34238c

Browse files
committed
Merge branch 'master' into move-tools-to-ocaml
2 parents 187bb06 + d39e28c commit e34238c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1965
-331
lines changed

.ocamlformat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
profile = default
2-
version = 0.22.4
2+
version = 0.26.1
33

44
field-space = tight-decl
55
break-cases = toplevel

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,32 @@
1212
1313
## master
1414

15+
#### :nail_care: Polish
16+
17+
- More cases of not emitting `_` when completing in expressions. https://github.com/rescript-lang/rescript-vscode/pull/890
18+
1519
#### :house: Internal
1620

1721
- Move `rescript-tools` to OCaml code and make `analysis` an library. https://github.com/rescript-lang/rescript-vscode/pull/855
1822

23+
## 1.34.0
24+
25+
#### :rocket: New Feature
26+
27+
- Complete domProps for lowercase JSX components from `ReactDOM.domProps` if possible. https://github.com/rescript-lang/rescript-vscode/pull/883
28+
- Complete for maker-style functions (functions returning type `t` of a module) when encountering a `type t` in relevant scenarios. https://github.com/rescript-lang/rescript-vscode/pull/884
29+
- Expand type aliases in hovers. https://github.com/rescript-lang/rescript-vscode/pull/881
30+
31+
#### :bug: Bug Fix
32+
33+
- Many bugfixes around nested pattern and expression completion. https://github.com/rescript-lang/rescript-vscode/pull/892
34+
35+
#### :nail_care: Polish
36+
37+
- Better error recovery when analysis fails. https://github.com/rescript-lang/rescript-vscode/pull/880
38+
- Do not emit `_` when completing in expressions. https://github.com/rescript-lang/rescript-vscode/pull/885
39+
- Include fields when completing a braced expr that's an ID, where it the path likely starts with a module. https://github.com/rescript-lang/rescript-vscode/pull/882
40+
1941
## 1.32.0
2042

2143
#### :bug: Bug Fix

analysis.opam

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ homepage: "https://github.com/rescript-lang/rescript-vscode"
77
bug-reports: "https://github.com/rescript-lang/rescript-vscode/issues"
88
depends: [
99
"ocaml" {>= "4.10"}
10+
"ocamlformat" {= "0.26.1"}
1011
"cppo" {= "1.6.9"}
1112
"dune"
1213
]

analysis/bin/main.ml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,14 @@ let main () =
145145
~pos:(int_of_string line_start, int_of_string line_end)
146146
~maxLength ~debug
147147
| [_; "codeLens"; path] -> Commands.codeLens ~path ~debug
148-
| [_; "extractDocs"; path] -> DocExtraction.extractDocs ~path ~debug
148+
| [_; "extractDocs"; path] ->
149+
let () =
150+
match Sys.getenv_opt "FROM_COMPILER" with
151+
| Some "true" -> Cfg.isDocGenFromCompiler := true
152+
| _ -> ()
153+
in
154+
155+
DocExtraction.extractDocs ~path ~debug
149156
| [_; "codeAction"; path; startLine; startCol; endLine; endCol; currentFile]
150157
->
151158
Commands.codeAction ~path

analysis/src/Commands.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ let references ~path ~pos ~debug =
163163
in
164164
print_endline
165165
(if allLocs = [] then Protocol.null
166-
else "[\n" ^ (allLocs |> String.concat ",\n") ^ "\n]")
166+
else "[\n" ^ (allLocs |> String.concat ",\n") ^ "\n]")
167167

168168
let rename ~path ~pos ~newName ~debug =
169169
let result =
@@ -304,6 +304,8 @@ let test ~path =
304304
(match String.sub rest 0 3 with
305305
| "db+" -> Log.verbose := true
306306
| "db-" -> Log.verbose := false
307+
| "dv+" -> Debug.debugLevel := Verbose
308+
| "dv-" -> Debug.debugLevel := Off
307309
| "def" ->
308310
print_endline
309311
("Definition " ^ path ^ " " ^ string_of_int line ^ ":"

0 commit comments

Comments
 (0)