Notepad-Sharp icon indicating copy to clipboard operation
Notepad-Sharp copied to clipboard

Can't change language attribute colors in Editor

Open Hexman768 opened this issue 4 years ago • 0 comments

Description

We can't change the colors of the language highlighter in the FastColoredTextBox.

Possible Solution

We might be able to fix this by overriding the existing SyntaxHighlighter with our own, this should allow us to change the styles of each language attribute.

Root Cause

This seems to be caused by this method that gets called to initialize the styles for each language in the SyntaxHighlighter class. Here is where the problem is: https://github.com/PavelTorgashov/FastColoredTextBox/blob/5361a7b07d7949ee32cdeb63ffdb206627ffcb8b/FastColoredTextBox/SyntaxHighlighter.cs#L622 Anytime the programming language is changed, that method gets called. We could override the aforementioned class to stop this method from getting called.

Hexman768 avatar Jan 31 '22 20:01 Hexman768