Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6f3f040

Browse files
committed
colorize type argument
1 parentf070cb8 commit6f3f040

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

‎src/fsharp/vs/service.fs‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,7 @@ type SemanticClassificationType =
501501
| IntrinsicType
502502
| Enumeration
503503
| Interface
504+
| TypeArgument
504505

505506
// A scope represents everything we get back from the typecheck of a file.
506507
// It acts like an in-memory database about the file.
@@ -1494,7 +1495,9 @@ type TypeCheckInfo
14941495
Some(m, SemanticClassificationType.ValueType)
14951496
| CNR(_, Item.Types_, LegitTypeOccurence,_,_,_, m)->
14961497
Some(m, SemanticClassificationType.ReferenceType)
1497-
| CNR(_,(Item.TypeVar_| Item.UnqualifiedType_| Item.CtorGroup_), LegitTypeOccurence,_,_,_, m)->
1498+
| CNR(_,(Item.TypeVar_), LegitTypeOccurence,_,_,_, m)->
1499+
Some(m, SemanticClassificationType.TypeArgument)
1500+
| CNR(_,(Item.UnqualifiedType_| Item.CtorGroup_), LegitTypeOccurence,_,_,_, m)->
14981501
Some(m, SemanticClassificationType.ReferenceType)
14991502
| CNR(_, Item.ModuleOrNamespaces refs, LegitTypeOccurence,_,_,_, m)when refs|> List.exists(fun x-> x.IsModule)->
15001503
Some(m, SemanticClassificationType.ReferenceType)

‎src/fsharp/vs/service.fsi‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ type internal SemanticClassificationType =
162162
| IntrinsicType
163163
| Enumeration
164164
| Interface
165+
| TypeArgument
165166

166167
/// A handle to the results of CheckFileInProject.
167168
[<Sealed>]

‎vsintegration/src/FSharp.Editor/Classification/ClassificationDefinitions.fs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ module internal FSharpClassificationTypes =
2525
let [<Literal>]Enum= ClassificationTypeNames.EnumName
2626
let [<Literal>]Property="FSharp.Property"
2727
let [<Literal>]Interface= ClassificationTypeNames.InterfaceName
28+
let [<Literal>]TypeArgument= ClassificationTypeNames.TypeParameterName
2829

2930
letgetClassificationTypeName=function
3031
| SemanticClassificationType.ReferenceType-> ReferenceType
@@ -39,6 +40,7 @@ module internal FSharpClassificationTypes =
3940
| SemanticClassificationType.Enumeration-> Enum
4041
| SemanticClassificationType.Property-> Property
4142
| SemanticClassificationType.Interface-> Interface
43+
| SemanticClassificationType.TypeArgument-> TypeArgument
4244

4345
moduleinternalClassificationDefinitions=
4446
[<Export; Name(FSharpClassificationTypes.Function); BaseDefinition(PredefinedClassificationTypeNames.FormalLanguage)>]

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp