@@ -117,15 +117,37 @@ type CodeFormatAgent() =
117
117
| SemanticClassificationType.Enumeration -> Some TokenKind.Enumeration
118
118
| SemanticClassificationType.Function -> Some TokenKind.Function
119
119
| SemanticClassificationType.Interface -> Some TokenKind.Interface
120
+ | SemanticClassificationType.Delegate -> Some TokenKind.ReferenceType
121
+ | SemanticClassificationType.DisposableLocalValue -> Some TokenKind.Disposable
122
+ | SemanticClassificationType.DisposableTopLevelValue -> Some TokenKind.Disposable
123
+ | SemanticClassificationType.DisposableType -> Some TokenKind.Disposable
124
+ | SemanticClassificationType.Event -> Some TokenKind.Property
125
+ | SemanticClassificationType.Exception -> Some TokenKind.ReferenceType
126
+ | SemanticClassificationType.ExtensionMethod -> Some TokenKind.Function
127
+ | SemanticClassificationType.Field -> Some TokenKind.Property
128
+ | SemanticClassificationType.Literal -> Some TokenKind.Property
129
+ | SemanticClassificationType.LocalValue -> Some TokenKind.Function
130
+ | SemanticClassificationType.Method -> Some TokenKind.Function
131
+ | SemanticClassificationType.MutableRecordField -> Some TokenKind.Property
132
+ | SemanticClassificationType.NamedArgument -> Some TokenKind.Function
133
+ | SemanticClassificationType.Namespace -> Some TokenKind.Identifier
134
+ | SemanticClassificationType.Plaintext -> Some TokenKind.Punctuation
135
+ | SemanticClassificationType.RecordField -> Some TokenKind.Property
136
+ | SemanticClassificationType.RecordFieldAsFunction -> Some TokenKind.Function
137
+ | SemanticClassificationType.Type -> Some TokenKind.ReferenceType
138
+ | SemanticClassificationType.TypeDef -> Some TokenKind.ReferenceType
139
+ | SemanticClassificationType.UnionCaseField -> Some TokenKind.Property
140
+ | SemanticClassificationType.Value -> Some TokenKind.Identifier
120
141
| SemanticClassificationType.Module -> Some TokenKind.Module
121
142
| SemanticClassificationType.MutableVar -> Some TokenKind.MutableVar
122
143
| SemanticClassificationType.Printf -> Some TokenKind.Printf
123
144
| SemanticClassificationType.Property -> Some TokenKind.Property
124
145
| SemanticClassificationType.ReferenceType -> Some TokenKind.ReferenceType
125
146
| SemanticClassificationType.UnionCase -> Some TokenKind.UnionCase
126
147
| SemanticClassificationType.ValueType -> Some TokenKind.ValueType
127
- | SemanticClassificationType.Disposable -> Some TokenKind.Disposable
128
148
| SemanticClassificationType.ComputationExpression -> Some TokenKind.Keyword
149
+ | SemanticClassificationType.ConstructorForReferenceType -> Some TokenKind.Function
150
+ | SemanticClassificationType.ConstructorForValueType -> Some TokenKind.Function
129
151
| SemanticClassificationType.TypeArgument -> Some TokenKind.TypeArgument
130
152
| SemanticClassificationType.Operator -> Some TokenKind.Operator
131
153
| SemanticClassificationType.IntrinsicFunction -> Some TokenKind.Keyword
@@ -178,9 +200,7 @@ type CodeFormatAgent() =
178
200
if ( token.TokenName = " IDENT" ) then
179
201
let island = List.rev island
180
202
let tip = checkResults.GetToolTipText( line + 1 , token.LeftColumn + 1 , lines.[ line], island, FSharpTokenTag.IDENT)
181
- match Async.RunSynchronously tip |> fun ( tooltip ) ->
182
- //tooltip.
183
- ToolTipReader.tryFormatTip tooltip with
203
+ match tip |> Async.RunSynchronously |> ToolTipReader.tryFormatTip with
184
204
| Some(_) as res -> res
185
205
| _ -> None
186
206
else None
@@ -371,7 +391,7 @@ type CodeFormatAgent() =
371
391
match res with
372
392
| Some (_ parseResults, parsedInput, checkResults) ->
373
393
Log.verbf " starting to GetAllUsesOfAllSymbolsInFile from '%s '" filePath
374
- let! _symbolUses = checkResults.GetAllUsesOfAllSymbolsInFile ()
394
+ let _symbolUses = checkResults.GetAllUsesOfAllSymbolsInFile ()
375
395
let errors = checkResults.Errors
376
396
let classifications =
377
397
checkResults.GetSemanticClassification ( Some parsedInput.Range)
0 commit comments