-
Notifications
You must be signed in to change notification settings - Fork 57
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
Added more highlightings #136
Conversation
Yes, but that's all up to the user. You can pick any color you want. I just wanted to demonstrate the ability to pick a color if you want extension methods/props to be more distinguishable. I mean you can try it yourself and get your own results :) |
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.
@En3Tho It looks very nice! Please add tests for the things that will now be highlighted differently.
ReSharper.FSharp/src/Daemon.FSharp/src/FSharpSymbolHighlightingUtil.cs
Outdated
Show resolved
Hide resolved
ReSharper.FSharp/src/Daemon.FSharp/src/FSharpSymbolHighlightingUtil.cs
Outdated
Show resolved
Hide resolved
ReSharper.FSharp/src/Daemon.FSharp/src/FSharpSymbolHighlightingUtil.cs
Outdated
Show resolved
Hide resolved
ReSharper.FSharp/src/Daemon.FSharp/src/FSharpSymbolHighlightingUtil.cs
Outdated
Show resolved
Hide resolved
ReSharper.FSharp/src/FSharp.Common/src/Util/FSharpHighlightingAttributeIds.fs
Outdated
Show resolved
Hide resolved
ReSharper.FSharp/src/FSharp.Common/src/Util/FSharpHighlightingAttributeIds.fs
Outdated
Show resolved
Hide resolved
It's OK to just update them with newer ids.
Please do. 🙂 |
ReSharper.FSharp/src/Daemon.FSharp/src/FSharpSymbolHighlightingUtil.cs
Outdated
Show resolved
Hide resolved
Removed FSharpParameter processing due to unexpected behaviour
Added an additional IsTypeFunction check to determine if value needs to be highlighted as a function
ReSharper.FSharp/test/data/features/daemon/identifierHighlighting/Functions 02.fs.gold
Outdated
Show resolved
Hide resolved
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.
@En3Tho Thanks! It's great to see a lot of new things covered in tests, but some cases seem a bit overcomplicated by seemingly not very related code. Could you try stripping some of it so it's easier to see the highlightings that each test case is about?
ReSharper.FSharp/test/data/features/daemon/identifierHighlighting/Computation expressions.fs
Outdated
Show resolved
Hide resolved
Fixed 2 broken tests. Removed FSharpParameter processing due to unexpected behaviour Added more tests FSharp Function highlighting now inherits from Value, not Method Added an additional IsTypeFunction check to determine if value needs to be highlighted as a function Added more tests for FSharpFunction highlighting Updated tests to be smaller and more concise Fixed some tests with TestReferences attribute. Cleanup
@En3Tho Thanks for this change! |
Sorry, I've messed it up a bit trying to push a small cleanup. The changes got merged without closing the PR automatically, so I'll close it manually. |
No problem. Thank you for accepting :) |
More highlightings for F#!
4. Generic constraints (not a separate option, gets auto highlighted like method or property)5. F# methods (let functions compiled as methods)(goes to FSharp functions)Before:
After:
There is still work to do with parameter highlighting, but after spending some time and getting no result I've decided to try pulling this as it already covers about 90% of what I wanted to do
TODO: