Closed hwooo closed 2 years ago
Unfortunately I can't find Rider for Unreal Engine version for Linux to debug your issue.
There is Win and Mac versions, but still waiting for Linux version to be released.
Rider for Unreal Engine was released, but there is no Linux version( Can anyone revalidate if it is still an issue?
The Linux version was released! I hope you able to fix it now.
@hwooo @neelkoos Looks good on my side. Can you share your example, which I can use for tests?
@clutcher It works with .cs but .cpp and .h not.
@neelkoos Thanks.
That highlighting is special one (it is basic lexer highlighting) and it doesn't support intellij annotators, which I use for additional highlighting. I'll work on it next but it will take some time to understand how to extend that highlighting and override it.
Intermediate results of investigation:
EditorImpl has list of change listeners, which we execute one by one. One of the listener is LexerEditorHighlighter, which holds CppLexer inside. After execution of this listener and lexer we can get from LexerEditorHighlighter data about token types and text of token.
In theory we can write and add one more listener, which will check find that highlighter, extract token types and text, process with comment highlighter and override TextAttribute.
P.S. Get token type by segment index: ((LexerEditorHighlighter) listeners[20]).getSegments().unpackTokenFromData(((LexerEditorHighlighter) listeners[20]).getSegments().getSegmentData(0))
Get token text by segment index: this.getImmutableCharSequence().subSequence(((LexerEditorHighlighter) listeners[20]).getSegments().getSegmentStart(0),((LexerEditorHighlighter) listeners[20]).getSegments().getSegmentEnd(0))
There is no highlighting if I write comments in Rider for UE.