Codist
Codist copied to clipboard
Syntax highlight for Find Reference and Search Result panel too?
Colorizing the Find Reference and Search Result panel would greatly improve the experience on reading those search results.
Codist is a cool project. I am looking forward to future versions. Thank you.
P.S. sorry I don't know how to add tag to this issue. I want to tag it "Feature Request" like other people did but no luck finding the UI.
Previously I used an extension named Codinion which had provided similar features as those you mentioned. However, I did not notice how helpful those features could be. And currently I could not find a way to intercept those windows. Do you know any open source projects which provide similar features?
To me, when the a search return lots of results, additional coloring on class name and function name helps a lot.
Just Searched the market place, there isn't any open source project providing similar features. May be this is not so easy.
Searched the Microsoft site a little bit. These two maybe related: IFindAllReferencesWindow, IFindResultsWindow
https://docs.microsoft.com/en-us/dotnet/api/microsoft.visualstudio.shell.findallreferences.ifindallreferencesservice.startsearch?view=visualstudiosdk-2017#Microsoft_VisualStudio_Shell_FindAllReferences_IFindAllReferencesService_StartSearch_System_String_
https://docs.microsoft.com/en-us/dotnet/api/microsoft.visualstudio.shell.findresults.ifindresultsservice?view=visualstudiosdk-2017
The names of the interface sounds like related but the documentation doesn't say much about it. The Manager properties seems to be holding the search result.
This class is intended to manage data from multiple data sources, each of which can provide tens of thousands discrete entries. All methods on this interface can be called from either the main thread or a background thread.
(I am only guessing )
I still could not figure it out. Thus the request had to be categorized as "backlog". But please don't feel down. Maybe something else will be developed in the future version.
FWIW, my Menees VS Tools extension has a FindResultsClassifier.cs to highlight Find Results like this:
Also, the much more popular VSColorOutput extension has a FindResultsClassifier.cs to do something similar.
I stumbled across this issue because I was searching for an example use of IFindResultsWindow, which was mentioned above. But maybe this info will help you out.
Thank you @menees. Your information did help.
In no time I developed some syntax highlight stuff into the Find Results' list view (it was no longer the default view in VS 2019 any more).
However, the syntax highlight was for C# only at this moment and the advanced syntax highlight was not yet in effect.
@fantasyz There's a new beta which partially implement this feature request now.
Oh nice! Good to see this feature making progress. Thank you for both of you!
It is quite weird that the highlight theme in the find results window does not match the document editor's, making the text very hard to read in the dark theme.
Text windows with ContentType == FindResults have a completely different set of "Fonts and Colors" than text windows with ContentType == CSharp. See my FindResultsFormats.cs for how I added my own highlight colors for FindResults FileName, Match, and Detail (non-Match) text.
I don't know of any way to switch themes per line. For example, if I search for "bool", I might find hits in .cs, .cpp, .fs, and .ts files. There's no simple way to apply the language-specific themes, taggers, etc. to each of those lines. That'll take a ton of manual work, and there's no guarantee that those language-specific editor colors (from Code ContentType windows) will look good in FindResults windows.
Thank you for your help. I partially figured it out by referencing the source code of VsColorOutput.
However, there's still some problems in the dark theme.