Skip to content

Commit 8a58226

Browse files
authored
Add module to SemanticTokenTypes (#1137)
* Add module to SemanticTokenTypes * Update HighlightingTests.fs
1 parent 5d5ffe8 commit 8a58226

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/FsAutoComplete/LspHelpers.fs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,7 @@ module ClassificationUtils =
465465
/// computation expressions
466466
| Cexpr = 23
467467
| Text = 24
468+
| Module = 25
468469

469470
[<RequireQualifiedAccess; Flags>]
470471
type SemanticTokenModifier =
@@ -502,7 +503,7 @@ module ClassificationUtils =
502503
| SemanticClassificationType.Property -> SemanticTokenTypes.Property, []
503504
| SemanticClassificationType.MutableVar
504505
| SemanticClassificationType.MutableRecordField -> SemanticTokenTypes.Member, [ SemanticTokenModifier.Mutable ]
505-
| SemanticClassificationType.Module
506+
| SemanticClassificationType.Module -> SemanticTokenTypes.Module, []
506507
| SemanticClassificationType.Namespace -> SemanticTokenTypes.Namespace, []
507508
| SemanticClassificationType.Printf -> SemanticTokenTypes.Regexp, []
508509
| SemanticClassificationType.ComputationExpression -> SemanticTokenTypes.Cexpr, []

test/FsAutoComplete.Tests.Lsp/HighlightingTests.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,4 @@ let tests state =
148148
tokenIsOfType (3, 52) ClassificationUtils.SemanticTokenTypes.Type fullHighlights // the `string` type annotation in the PooPoo srtp member
149149
tokenIsOfType (6, 21) ClassificationUtils.SemanticTokenTypes.EnumMember fullHighlights // the `PeePee` AP application in the `yeet` function definition
150150
tokenIsOfType (9, 10) ClassificationUtils.SemanticTokenTypes.Type fullHighlights //the `SomeJson` type alias should be a type
151-
tokenIsOfType (15, 2) ClassificationUtils.SemanticTokenTypes.Namespace fullHighlights ] ] // tests that module coloration isn't overwritten by function coloration when a module function is used, so Foo in Foo.x should be module-colored
151+
tokenIsOfType (15, 2) ClassificationUtils.SemanticTokenTypes.Module fullHighlights ] ] // tests that module coloration isn't overwritten by function coloration when a module function is used, so Foo in Foo.x should be module-colored

0 commit comments

Comments
 (0)