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

Commit7b99170

Browse files
vasily-kirichenkoKevinRansom
authored andcommitted
colorize modules (dotnet#2036)
fixed: namespaces are colorized as part of qualified names
1 parent8e07ffe commit7b99170

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

‎src/fsharp/vs/service.fs‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1425,6 +1425,13 @@ type TypeCheckInfo
14251425
| ItemOccurence.Binding_
14261426
| ItemOccurence.Pattern_),_,_,_, m)->
14271427
Some(m, FSharpTokenColorKind.TypeName)
1428+
| CNR(_, Item.ModuleOrNamespaces refs,
1429+
( ItemOccurence.UseInType
1430+
| ItemOccurence.UseInAttribute
1431+
| ItemOccurence.Use_
1432+
| ItemOccurence.Binding_
1433+
| ItemOccurence.Pattern_),_,_,_, m)when refs|> List.exists(fun x-> x.IsModule)->
1434+
Some(m, FSharpTokenColorKind.TypeName)
14281435
|_-> None)
14291436
|> Seq.toArray
14301437

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ type internal FSharpColorizationService
5959
| FSharpCheckFileAnswer.Aborted->[||]
6060
| FSharpCheckFileAnswer.Succeeded(results)->
6161
[|for(range, tokenColorKind)in results.GetExtraColorizationsAlternate()do
62-
letspan= CommonRoslynHelpers.FSharpRangeToTextSpan(sourceText, range)
62+
letspan=CommonHelpers.fixupSpan(sourceText,CommonRoslynHelpers.FSharpRangeToTextSpan(sourceText, range))
6363
if textSpan.Contains(span.Start)|| textSpan.Contains(span.End-1)|| span.Contains(textSpan)then
6464
yield ClassifiedSpan(span, CommonHelpers.compilerTokenToRoslynToken(tokenColorKind))|]
6565

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp