VisualStudio C#: Custom LangType for the NotepadPPGateway



  • I have successfully created several UDL highlighting XML’s for a few non-mainstream file types that I regularly work with. However, the next one doesn’t have clearly defined Start/Stop folding characters. It operates more upon the basis of another foldable keyword should stop a previous one and start a new one. This has created a huge problem for me in the current UDL implementation. Which has me looking into creating a DLL version of syntax highlighting for that file type capable of also handling this (currently) unsupported folding scenario.

    I have located the Visual Studio project for C# and gone through the various examples readily available, but my journey always seems to end with those examples calling the NotepadPPGateway and feeding it a predefined LangType enum. Is there a way (using C#) to create my own syntax highlighting/folding plugin for Notepad++? The examples running around don’t appear to shed much light on this question. So, if anyone could get me moving in the right direction or help me stop wasting my time, then I would appreciate it.



  • @KSI-JHoward

    don’t have a samle for c# but here is described what needs to be done and if you use, by any chance, the python script plugin in its latest version, check the samples for ColumnLexer and LogfileLexer - not the EnhancedPythonLexer example as this uses a different technique. Used to, as the name suggest, enhance an existing lexer rather than writing a new lexer.


Log in to reply