Files

114 lines
8.3 KiB
XML
Raw Permalink Normal View History

<?xml version="1.0" encoding="UTF-8"?>
<!--
Klammertext.udl.xml - Notepad++ User Defined Language for Klammertext
(.kt documents and .k klammer definitions). Highlighting only: Notepad++
has no Python plugin host and no built-in language-server client, so the
structural tools of the shared core (doc/edit/shared/klammertext_edit.py)
are reached through Run-menu commands instead; README.md has them.
What it colours, and how (a UDL is a fixed set of token classes, not a
grammar; the choices below are the closest fit):
@@@name, @@@ system commands Keywords1, prefix match, orange
@@name, @@ klammer definitions Keywords2, prefix match, green
@name, @ klammer applications Keywords3, prefix match, blue
The groups are checked in order, longest run first,
so @@name is not taken for an @ followed by a name.
A named close (name@) is coloured only at its @.
^X ^UUUU^ ^' escapes Keywords4, prefix match, the
default colour: consumed so the character after the
caret is never read as a delimiter, shown as text
(as the Emacs mode does).
# ... removal to end of line line comment, grey; only
when the # is the first thing on its line
(forcePureLC), because a UDL comment cannot tell
"# comment" from the whitespace operators #- #+ #/,
which would otherwise grey the rest of their line.
#[ ... ]# removal of a region block comment, grey, folds.
## #- #+ #/ the other # forms Operators2, marker red.
| : bars and option marks Operators1, marker red.
@code ... code@ verbatim interior Delimiters1, muted, nothing
inside it is coloured. The other literal klammer,
@c ... c@, is NOT here: a UDL delimiter has no word
boundary, so "@c" would also open at @caption,
@cond and every other c-klammer.
SYNC: the literal-klammer set's source of truth is LITERAL_KLAMMERS in
doc/edit/shared/klammertext_edit.py. When a klammer is added there, add
"@NAME" / "NAME@" as a further delimiter pair here (pairs 2 to 8 are free:
items 03/05, 06/08, ... in the "Delimiters" list) - if its name is not a
prefix of other klammer names.
Colours are the palette's light-ground values (notes/klammertext_palette.md:
application 528599, definition 758B55, system 996743, markers 994040,
removed text 9A9A9A); colorStyle="1" keeps every background transparent, so
a dark Notepad++ theme keeps its own ground (the hues still read there).
Install: copy this file into %AppData%\Notepad++\userDefineLangs\ and
restart Notepad++ (or Language > User Defined Language > Define your
language... > Import...). README.md has the details and the Run commands.
-->
<NotepadPlus>
<UserLang name="Klammertext" ext="kt k" udlVersion="2.1">
<Settings>
<Global caseIgnored="no" allowFoldOfComments="yes" foldCompact="no" forcePureLC="1" decimalSeparator="0" />
<Prefix Keywords1="yes" Keywords2="yes" Keywords3="yes" Keywords4="yes" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00# 01 02 03#[ 04]#</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
<Keywords name="Numbers, extras1"></Keywords>
<Keywords name="Numbers, extras2"></Keywords>
<Keywords name="Numbers, suffix1"></Keywords>
<Keywords name="Numbers, suffix2"></Keywords>
<Keywords name="Numbers, range"></Keywords>
<Keywords name="Operators1">| :</Keywords>
<Keywords name="Operators2">## #- #+ #/</Keywords>
<Keywords name="Folders in code1, open"></Keywords>
<Keywords name="Folders in code1, middle"></Keywords>
<Keywords name="Folders in code1, close"></Keywords>
<Keywords name="Folders in code2, open"></Keywords>
<Keywords name="Folders in code2, middle"></Keywords>
<Keywords name="Folders in code2, close"></Keywords>
<Keywords name="Folders in comment, open">#[</Keywords>
<Keywords name="Folders in comment, middle"></Keywords>
<Keywords name="Folders in comment, close">]#</Keywords>
<Keywords name="Keywords1">@@@</Keywords>
<Keywords name="Keywords2">@@</Keywords>
<Keywords name="Keywords3">@</Keywords>
<Keywords name="Keywords4">^</Keywords>
<Keywords name="Keywords5"></Keywords>
<Keywords name="Keywords6"></Keywords>
<Keywords name="Keywords7"></Keywords>
<Keywords name="Keywords8"></Keywords>
<Keywords name="Delimiters">00@code 01 02code@ 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords>
</KeywordLists>
<Styles>
<WordsStyle name="DEFAULT" fgColor="000000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="COMMENTS" fgColor="9A9A9A" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="LINE COMMENTS" fgColor="9A9A9A" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="NUMBERS" fgColor="000000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS1" fgColor="996743" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORDS2" fgColor="758B55" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORDS3" fgColor="528599" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORDS4" fgColor="000000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS5" fgColor="000000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS6" fgColor="000000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS7" fgColor="000000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS8" fgColor="000000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="OPERATORS" fgColor="994040" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN CODE1" fgColor="000000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN COMMENT" fgColor="994040" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS1" fgColor="5A5A5A" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS2" fgColor="000000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS3" fgColor="000000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
</Styles>
</UserLang>
</NotepadPlus>