Closed tobeypeters closed 5 years ago
Really want to get all this working flawlessly.
Side Note: Need a lexer which tokenizes. I can break the styling pretty easy with this, even excluding my code. I can tell this Jacob guy is a really great coder. Just saying, a normal lexer will make things easier or more fail-safe. I AM still trying to figure out how to adapt this one.
Update : If you Style the entire document every time things work much much better. But, we shouldn't have to do that or do the Lexer & Tokenizer approaches do that anyway.
Update 2 : Changed the Lexer, so you can tell it to do the entire document or just the StyleNeeded text range. I'm not scanning the entire document unless one of the following characters are deleted [ ", /, * ]
Any reason you are not using the built in C++ lexer, or using the C++ lexer as a starting point?
My ScintillaNET.WPF project uses the C++ lexer for C# by default if you want to play with it.
I know how to use the other Lexers. They're limited and can't be extended. Even, just formatted and Verbatim strings don't display, how I want. I'm after a Visual Studio style highlighting, with a few extras. I can't use just StyleNeeded() and stuff. Cause you got to set the Lexer to Container. I thought you could use UpdateUI originally as a hack. But, depending on what you do, it causes the CPU to peg at about 25%.
Edit: Newer better version of the CSharp Lexer on my Github.
So, I've started updating the CSharp Lexer code from the Wiki page. Looking for help, now, to make it better.
Form_Load:
CSharp Lexer: