-
Notifications
You must be signed in to change notification settings - Fork 824
Quick info glyph #2028
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quick info glyph #2028
Conversation
…lost during one of the merges
Amazing. You even fix the details. Hero. |
@vasily-kirichenko
|
@KevinRansom fixed. |
Let me know if I should merge with master (when master is green again). |
@vasily-kirichenko should these use : SymbolSearchKind.DoesNotIncludeRightColumn |
Both should use |
Yay ... I guessed right :-) |
:) All features use |
# Conflicts: # vsintegration/src/FSharp.Editor/CommonHelpers.fs
I've merged with master. |
@dotnet-bot test this please |
Love it! Next step is hooking up to a presenter to get type colors in there. I plan on looking at that over Christmas time. Well, assuming you don't already have it implemented by then :p |
You don't need a custom presenter - you should look at how Roslyn does it here with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
other than packages this looks good.
@@ -18,6 +18,8 @@ | |||
<package id="Microsoft.VisualStudio.Shell.Design" version="14.3.25407" targetFramework="net46" /> | |||
<package id="Microsoft.VisualStudio.Settings.15.0" version="15.0.25824-RC" targetFramework="net46" /> | |||
<package id="Microsoft.VisualStudio.Utilities" version="14.3.25407" targetFramework="net46" /> | |||
<package id="Microsoft.VisualStudio.Imaging" version="14.3.25407" targetFramework="net46" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or perhaps we should get 2.0.0-rc2 versions published
@@ -113,6 +117,12 @@ | |||
<Reference Include="Microsoft.VisualStudio.CoreUtility, Version=$(RoslynVSBinariesVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> | |||
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.CoreUtility.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.CoreUtility.dll</HintPath> | |||
</Reference> | |||
<Reference Include="Microsoft.VisualStudio.Imaging, Version=$(RoslynVSBinariesVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> | |||
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Imaging.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Imaging.dll</HintPath> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The package path might not be right.
@KevinRansom I'm not sure I understand how VS package versioning set up here. Why these references so complicated? https://github.com/Microsoft/visualfsharp/blob/master/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj#L92-L133 It looks like all VisualStudio.xxx packages are assumed to have exactly same <Reference Include="Microsoft.VisualStudio.Editor, Version=$(RoslynVSBinariesVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Editor.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Editor.dll</HintPath>
</Reference> That's not the case we have currently: <package id="Microsoft.VisualStudio.LanguageServices" version="2.0.0-rc2" targetFramework="net46" />
<package id="Microsoft.Composition" version="1.0.27" targetFramework="net46" />
<package id="Microsoft.VisualStudio.Package.LanguageService.14.0" version="14.3.25407" targetFramework="net46" />
<package id="Microsoft.VisualStudio.Editor" version="14.3.25407" targetFramework="net46" />
<package id="Microsoft.VisualStudio.Text.UI" version="14.3.25407" targetFramework="net46" />
<package id="Microsoft.VisualStudio.Text.UI.Wpf" version="14.3.25407" targetFramework="net46" />
<package id="Microsoft.VisualStudio.Text.Data" version="14.3.25407" targetFramework="net46" />
<package id="Microsoft.VisualStudio.Text.Logic" version="14.3.25407" targetFramework="net46" />
<package id="Microsoft.VisualStudio.Threading" version="14.1.131" targetFramework="net46" />
<package id="Microsoft.VisualStudio.CoreUtility" version="14.3.25407" targetFramework="net46" />
<package id="Microsoft.VisualStudio.Shell.Design" version="14.3.25407" targetFramework="net46" />
<package id="Microsoft.VisualStudio.Settings.15.0" version="15.0.25824-RC" targetFramework="net46" />
<package id="Microsoft.VisualStudio.Utilities" version="14.3.25407" targetFramework="net46" />
<package id="Microsoft.VisualStudio.Language.StandardClassification" version="14.3.25407" targetFramework="net46" />
<package id="Microsoft.VisualStudio.Language.Intellisense" version="14.3.25407" targetFramework="net46" />
<package id="Microsoft.VisualStudio.Designer.Interfaces" version="1.1.4322" /> You suggest to update Imaging to RC, so how it should be done? Some packages are available in version 15.0.25901-RC, some are not. I found this approach hard to maintain. Why just not use VS UI to manage the packages automagically? |
@vladima Oh, cool! |
OK, I've sorted out the packages versions, now VisualFSharp.sln builds successfully on clean checkout. |
@Pilchie @vladima I tried to colorize signature help by changing https://github.com/Microsoft/visualfsharp/blob/ca2ed9bfbec4710802f3782ce8840ec060618347/vsintegration/src/FSharp.Editor/Completion/SignatureHelp.fs#L182-L206 to use TextTags.Class, TextTags.Keyword, etc. However, F# signature helps still have no color. Any idea on creating a signature help presenter for F#? |
I think it's relevant but should not be necessary. The signature help is colorized at http://source.roslyn.io/#Microsoft.CodeAnalysis.EditorFeatures/Implementation/Intellisense/SignatureHelp/Presentation/SignatureHelpClassifier.cs,50 The signature help classifier is restricted to C#/VB at http://source.roslyn.io/#Microsoft.CodeAnalysis.EditorFeatures/Implementation/Intellisense/SignatureHelp/Presentation/SignatureHelpClassifierProvider.cs,13. What is the easiest way to enable this for F# signature help? /cc @Pilchie @vladima |
Ok, I found a way in #2034 |
Tests fail because VisualFSharp.unittests.dll cannot be loaded: Any ideas how to spot the wrong/missing assembly? I think that the way packages are managed in this repository is unhealthy. What about switching to Paket? /cc @forki |
a737570
to
cf09f94
Compare
OK, I reverted the big changes (VS packages ver. 14 -> 15) and it's now simply adds a single |
I'm stuck with this :( |
@vasily-kirichenko |
@KevinRansom thanks! |
@KevinRansom BTW, I had to write this unsafe casting: let moniker = GlyphExtensions.GetImageMoniker(glyph)
let image = new CrispImage()
image.Moniker <- (box moniker) :?> _ because |
@vasily-kirichenko @Pilchie @brettfo This happens because the Roslyn dll's do not have InternalsVisible enabled for VisualFSharpTests.dll This guy's async returns a value:
Microsoft.CodeAnalysis.Glyph is internal and thus can not be seen from the test dll. Which means it can't be used in test code unless the test code has Internals Visible enabled for it: Either: |
@KevinRansom Thanks! Will try #1. |
@KevinRansom fixed. I can load and run the tests locally. Phew, that was a tricky nasty stuff. Thanks! |
@dotnet-bot test this please |
Hmmm that failure is absolutely not expected. |
@vladima has almost finished his work on colorful quick info tooltips here master...vladima:vladima/classification which operates on a slightly higher level of abstraction than this PR and it's incompatible with it anyway. So I'm closing this in favor of vladima#1 (or whatever approach @vladima will choose for showing the glyph). Currently it looks like this: |
Okay ... thanks. |
@KevinRansom sorry for wasting your time :( |
@vasily-kirichenko Kevin |
WIP