File tree Expand file tree Collapse file tree 5 files changed +62
-0
lines changed
tests/analysis_tests/tests/src Expand file tree Collapse file tree 5 files changed +62
-0
lines changed Original file line number Diff line number Diff line change 12
12
13
13
# 12.0.0-alpha.8 (Unreleased)
14
14
15
+ #### :bug : Bug fix
16
+
17
+ - Editor: Fix issue where completions would not show up inside of object bodies.
18
+
15
19
# 12.0.0-alpha.7
16
20
17
21
#### :bug : Bug fix
Original file line number Diff line number Diff line change @@ -1107,6 +1107,8 @@ let completionWithParser1 ~currentFile ~debug ~offset ~path ~posCursor
1107
1107
if expr.pexp_loc |> Loc. hasPos ~pos: posNoWhite && ! result = None then (
1108
1108
setFound () ;
1109
1109
match expr.pexp_desc with
1110
+ | Pexp_extension ({txt = "obj" } , PStr [str_item ]) ->
1111
+ Ast_iterator. default_iterator.structure_item iterator str_item
1110
1112
| Pexp_extension ({txt} , _ ) -> setResult (CextensionNode txt)
1111
1113
| Pexp_constant _ -> setResult Cnone
1112
1114
| Pexp_ident lid ->
Original file line number Diff line number Diff line change
1
+ let x = Some (true )
2
+
3
+ let _ff = {
4
+ "one" : switch x {
5
+ | Some (true ) => "hello"
6
+ // |
7
+ // ^com
8
+ | _ => ""
9
+ },
10
+ }
Original file line number Diff line number Diff line change
1
+ Complete src/CompletionObjects.res 5:7
2
+ posCursor:[5:7] posNoWhite:[5:5] Found expr:[2:10->9:1]
3
+ posCursor:[5:7] posNoWhite:[5:5] Found expr:[2:10->9:1]
4
+ posCursor:[5:7] posNoWhite:[5:5] Found pattern:__ghost__[0:-1->7:5]
5
+ posCursor:[5:7] posNoWhite:[5:5] Found pattern:__ghost__[0:-1->7:5]
6
+ Completable: Cpattern Value[x]
7
+ Package opens Pervasives.JsxModules.place holder
8
+ ContextPath Value[x]
9
+ Path x
10
+ [{
11
+ "label": "None",
12
+ "kind": 12,
13
+ "tags": [],
14
+ "detail": "bool",
15
+ "documentation": null
16
+ }, {
17
+ "label": "Some(_)",
18
+ "kind": 12,
19
+ "tags": [],
20
+ "detail": "bool",
21
+ "documentation": null,
22
+ "insertText": "Some(${1:_})",
23
+ "insertTextFormat": 2
24
+ }, {
25
+ "label": "Some(true)",
26
+ "kind": 4,
27
+ "tags": [],
28
+ "detail": "bool",
29
+ "documentation": null
30
+ }, {
31
+ "label": "Some(false)",
32
+ "kind": 4,
33
+ "tags": [],
34
+ "detail": "bool",
35
+ "documentation": null
36
+ }]
37
+
Original file line number Diff line number Diff line change
1
+ let x = Some (true )
2
+ let _ff = {
3
+ "one" : switch x {
4
+ | Some (true ) => "hello"
5
+ // |
6
+ // ^com
7
+ | _ => ""
8
+ },
9
+ }
You can’t perform that action at this time.
0 commit comments