-
Notifications
You must be signed in to change notification settings - Fork 5
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
Integrate Language Server Protocol functionality into Code Windows #751
Conversation
This also heavily refactors our existing scanner infrastructure to accomodate both Antlr based lexers and LSP-based semantic token providers. As the latter also support supplying token modifiers, support for this has been added as well (e.g., rendering static things in italics).
This can be used to override equality checks to use reference equality, which can be useful for e.g. records.
This also improves the tooltip a bit, by giving it both a minimum and maximum width.
This bug previously occurred if the entries' titles contained any slashes, as this would induce different behavior in the Transform.Find method.
This displays a code window for a given path and range, instead of for a given graph element. It works by calling the `FittingElements` extension method on the graph, also implemented in this commit. This, in turn, finds graph elements matching the given path and range, ordered by how well they fit.
To make things easier and less computationally intensive, we now simply make the line number of the marked line red instead of marking the whole line with some background color.
This can be triggered by right-clicking any element in the code window.
This gives us a much easier option of using existing icons, rather than having to import an image and convert it to a sprite each time. It also improves performance a bit.
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 are a few bad patterns I found which you should check.
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.
I have only very minor issues.
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.
All fine now. Ready to merge.
This PR integrates LSP-based information and functionality into SEE's code windows. It is the third and final part of my master's thesis implementation.
This PR resolves #686 and it resolves #728.
LSP integration
The following Language Server features have been integrated into Code Windows1:
Additional changes
char
instead of aSprite
, where the character represents a FontAwesome codepoint, in accordance with our new icon system. This makes it much easier to use new icons compared to the old Sprite-based system.DashboardRetriever
. By default, it will fail a request after 5 seconds, but this is configurable in the editor.ReferenceEqualityComparer
class has been added from the .NET 5 source code.Footnotes
Note that all of these features will only be used if the corresponding option in the LSP handler has been enabled. ↩