Skip to content

Commit 67f620e

Browse files
committed
sort React.element functions on top
1 parent 9524dfa commit 67f620e

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

analysis/src/CompletionBackEnd.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1628,7 +1628,7 @@ let rec getCompletionsForContextPath ~full ~opens ~rawOpens ~allFiles ~pos ~env
16281628
[
16291629
Completion.createWithSnippet
16301630
~name:("React." ^ builtinNameToComplete)
1631-
~kind:(Value typ) ~env
1631+
~kind:(Value typ) ~env ~sortText:"A"
16321632
~docstring:
16331633
[
16341634
"Turns `" ^ builtinNameToComplete

analysis/tests/src/expected/CompletionJsx.res.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Completable: Cpath Value[someString]->st <<jsx>>
3030
"tags": [],
3131
"detail": "string",
3232
"documentation": {"kind": "markdown", "value": "Turns `string` into `React.element` so it can be used inside of JSX."},
33+
"sortText": "A",
3334
"insertTextFormat": 2
3435
}, {
3536
"label": "Js.String2.startsWith",
@@ -70,6 +71,7 @@ Completable: Cpath Value[someString]->st <<jsx>>
7071
"tags": [],
7172
"detail": "string",
7273
"documentation": {"kind": "markdown", "value": "Turns `string` into `React.element` so it can be used inside of JSX."},
74+
"sortText": "A",
7375
"insertTextFormat": 2
7476
}, {
7577
"label": "Js.String2.startsWith",
@@ -110,6 +112,7 @@ Completable: Cpath string->st <<jsx>>
110112
"tags": [],
111113
"detail": "string",
112114
"documentation": {"kind": "markdown", "value": "Turns `string` into `React.element` so it can be used inside of JSX."},
115+
"sortText": "A",
113116
"insertTextFormat": 2
114117
}, {
115118
"label": "Js.String2.startsWith",
@@ -150,6 +153,7 @@ Completable: Cpath Value[Js, String2, trim](Nolabel)->st <<jsx>>
150153
"tags": [],
151154
"detail": "string",
152155
"documentation": {"kind": "markdown", "value": "Turns `string` into `React.element` so it can be used inside of JSX."},
156+
"sortText": "A",
153157
"insertTextFormat": 2
154158
}, {
155159
"label": "Js.String2.startsWith",
@@ -190,6 +194,7 @@ Completable: Cpath Value[someInt]-> <<jsx>>
190194
"tags": [],
191195
"detail": "int",
192196
"documentation": {"kind": "markdown", "value": "Turns `int` into `React.element` so it can be used inside of JSX."},
197+
"sortText": "A",
193198
"insertTextFormat": 2
194199
}, {
195200
"label": "Belt.Int.fromString",
@@ -266,6 +271,7 @@ Completable: Cpath int-> <<jsx>>
266271
"tags": [],
267272
"detail": "int",
268273
"documentation": {"kind": "markdown", "value": "Turns `int` into `React.element` so it can be used inside of JSX."},
274+
"sortText": "A",
269275
"insertTextFormat": 2
270276
}, {
271277
"label": "Belt.Int.fromString",
@@ -342,6 +348,7 @@ Completable: Cpath Value[someArr]->a <<jsx>>
342348
"tags": [],
343349
"detail": "array<React.element>",
344350
"documentation": {"kind": "markdown", "value": "Turns `array` into `React.element` so it can be used inside of JSX."},
351+
"sortText": "A",
345352
"insertTextFormat": 2
346353
}, {
347354
"label": "Js.Array2.append",

0 commit comments

Comments
 (0)