Setting text color via a .NET plugin
I’ve been trying to get proper coloring for .log files set up, but since UDL does not support regexes (Like why would someone think this is a good idea???), I decided to write my own plugin merely to color text the way I want it to.
I have many years of experience with .NET and was able to get the NppManagedPluginDemo to work after some tinkering (the project is designed to work with VS2015, not VS2017). Now I’m looking for just some examples or documentation on coloring text from plugins.
normally, style changes will be done by the lexer assigned, so make sure that your
files do not get styled by an internal lexer as well, otherwise you are in trouble as there
is no safe way to determine which lexer (yours or the internal one) gets called last and therefore
does the styling one sees. See here for the API description. Be aware that npp uses scintilla 3.5.6, so, not all api calls are available.
For a starting point, I posted here an example how such an script/prog could look like.