File tree Expand file tree Collapse file tree 4 files changed +7
-8
lines changed Expand file tree Collapse file tree 4 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ module Token = struct
4
4
(* This needs to stay synced with the same legend in `server.ts` *)
5
5
(* See https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_semanticTokens *)
6
6
type tokenType =
7
- | Keyword
7
+ | Operator
8
8
| Variable
9
9
| Type
10
10
| JsxTag
@@ -16,7 +16,7 @@ module Token = struct
16
16
type tokenModifiers = NoModifier
17
17
18
18
let tokenTypeToString = function
19
- | Keyword -> " 0"
19
+ | Operator -> " 0"
20
20
| Variable -> " 1"
21
21
| Type -> " 2"
22
22
| JsxTag -> " 3"
@@ -26,7 +26,7 @@ module Token = struct
26
26
| JsxLowercase -> " 7"
27
27
28
28
let tokenTypeDebug = function
29
- | Keyword -> " Keyword "
29
+ | Operator -> " Operator "
30
30
| Variable -> " Variable"
31
31
| Type -> " Type"
32
32
| JsxTag -> " JsxTag"
@@ -298,7 +298,7 @@ let parser ~debug ~emitter ~path =
298
298
},
299
299
[_; _] ) ->
300
300
if debug then Printf. printf " Binary operator %s %s\n " op (locToString loc);
301
- emitter |> emitFromLoc ~loc ~type_: Keyword ;
301
+ emitter |> emitFromLoc ~loc ~type_: Operator ;
302
302
Ast_mapper. default_mapper.expr mapper e
303
303
| Pexp_record (cases , _ ) ->
304
304
cases
Original file line number Diff line number Diff line change 255
255
"patterns" : [
256
256
{
257
257
"match" : " ->|\\ |\\ ||&&|\\ +\\ +|\\ *\\ *|\\ +\\ .|\\ +|-\\ .|-|\\ *\\ .|\\ *|/\\ .|/|\\ .\\ .\\ .|\\ .\\ .|===|==|\\ ^|:=|!|>=(?! *\\ ?)|<=|=" ,
258
- "name" : " keyword.operator keyword "
258
+ "name" : " keyword.operator"
259
259
},
260
260
{
261
261
"match" : " \\ |>" ,
Original file line number Diff line number Diff line change 32
32
{
33
33
"scopes" : {
34
34
"jsx-lowercase" : [" entity.name.tag" ],
35
- "jsx-tag" : [" punctuation.definition.tag" ],
36
- "keyword-tag" : [" keyword" ]
35
+ "jsx-tag" : [" punctuation.definition.tag" ]
37
36
}
38
37
}
39
38
],
Original file line number Diff line number Diff line change @@ -761,7 +761,7 @@ function onMessage(msg: m.Message) {
761
761
semanticTokensProvider : {
762
762
legend : {
763
763
tokenTypes : [
764
- "keyword-tag " ,
764
+ "operator " ,
765
765
"variable" ,
766
766
"type" ,
767
767
"jsx-tag" ,
You can’t perform that action at this time.
0 commit comments