I am working on kate syntax highlighting and language server for CoD 1 GSC.
How do I get this word highlighting? Is it from the language server or highlighting?
Highlighting:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language>
<language name="CoD GSC" version="1.0" kateversion="5.79" section="Scripts"
extensions="*.gsc" mimetype="text/x-gsc" priority="15"
author="Kazam" license="MIT">
<highlighting>
<!-- === Keyword Lists === -->
<list name="controlflow">
<item>if</item>
<item>else</item>
<item>while</item>
<item>for</item>
<item>break</item>
<item>return</item>
<item>switch</item>
<item>case</item>
<item>default</item>
</list>
<list name="gsc_keywords">
<item>thread</item>
<item>wait</item>
<item>waittill</item>
<item>waittillframeend</item>
<item>end</item>
<item>endon</item>
</list>
<list name="gsc_caller">
<item>self</item>
<item>player</item>
<item>level</item>
</list>
<list name="types">
<item>int</item>
<item>float</item>
<item>bool</item>
<item>string</item>
<item>lstring</item>
</list>
<list name="constants">
<item>true</item>
<item>false</item>
<item>undefined</item>
</list>
<!-- === Contexts === -->
<contexts>
<context name="Normal" attribute="Normal Text" lineEndContext="#stay">
<DetectSpaces />
<!-- Comments should be checked BEFORE other rules -->
<StringDetect attribute="Comment" context="LineComment" String="//" />
<Detect2Chars attribute="Comment" context="BlockComment" char="/" char1="*" />
<!-- Preprocessors -->
<DetectChar attribute="Preprocessor" context="Preprocessor" char="#" />
<!-- Strings -->
<DetectChar attribute="String" context="StringDQ" char=""" />
<DetectChar attribute="String" context="StringSQ" char="'" />
<!-- Numbers (integer & simple float) -->
<RegExpr attribute="Number" context="#stay" String="\b[0-9]+(\.[0-9]+)?\b" />
<!-- Scope paths: folder\file:: or just identifier:: -->
<RegExpr attribute="Scope" context="#stay" String="(?:[a-zA-Z_]\w*\\)?[a-zA-Z_]\w*::" />
<!-- Function reference after :: e.g. folder\file::func_name -->
<RegExpr attribute="Function" context="#stay" String="(?<=::)[a-zA-Z_]\w*" />
<!-- Function name + opening paren: color name as Function, enter Arguments -->
<RegExpr attribute="Function" context="Arguments" String="\b[a-zA-Z_]\w*(?=\s*\()" />
<!-- Keywords -->
<IncludeRules context="MatchKeywords" />
<!-- Symbols and operators -->
<AnyChar attribute="Symbol" context="#stay" String="{}()[]=!<>:+\-*/|&^%;,." />
<!-- Identifiers (fallback) -->
<DetectIdentifier />
</context>
<context name="Preprocessor" attribute="Preprocessor" lineEndContext="#pop">
<LineContinue attribute="Preprocessor" context="#stay" />
<DetectSpaces />
</context>
<context name="MatchKeywords" attribute="Normal Text" lineEndContext="#stay">
<keyword attribute="Control Flow" context="#stay" String="controlflow" />
<keyword attribute="Keyword" context="#stay" String="gsc_keywords" />
<keyword attribute="Data Type" context="#stay" String="types" />
<keyword attribute="Constant" context="#stay" String="constants" />
<keyword attribute="Self" context="#stay" String="gsc_caller" />
</context>
<context name="LineComment" attribute="Comment" lineEndContext="#pop">
<DetectSpaces />
<IncludeRules context="##Comments" />
</context>
<context name="BlockComment" attribute="Comment" lineEndContext="#stay">
<DetectSpaces />
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" />
<IncludeRules context="##Comments" />
</context>
<context name="StringDQ" attribute="String" lineEndContext="#pop">
<DetectChar attribute="String" context="#pop" char=""" />
<Detect2Chars attribute="String Escape" context="#stay" char="\" char1=""" />
<Detect2Chars attribute="String Escape" context="#stay" char="\" char1="'" />
<Detect2Chars attribute="String Escape" context="#stay" char="\" char1="\" />
<Detect2Chars attribute="String Escape" context="#stay" char="\" char1="n" />
<Detect2Chars attribute="String Escape" context="#stay" char="\" char1="t" />
<Detect2Chars attribute="String Escape" context="#stay" char="\" char1="r" />
</context>
<context name="StringSQ" attribute="String" lineEndContext="#pop">
<DetectChar attribute="String" context="#pop" char="'" />
<Detect2Chars attribute="String Escape" context="#stay" char="\" char1=""" />
<Detect2Chars attribute="String Escape" context="#stay" char="\" char1="'" />
<Detect2Chars attribute="String Escape" context="#stay" char="\" char1="\" />
<Detect2Chars attribute="String Escape" context="#stay" char="\" char1="n" />
<Detect2Chars attribute="String Escape" context="#stay" char="\" char1="t" />
<Detect2Chars attribute="String Escape" context="#stay" char="\" char1="r" />
</context>
<!-- Inside parens: plain identifiers get Argument color, nested calls recurse -->
<context name="Arguments" attribute="Argument" lineEndContext="#stay">
<!-- Consume the opening ( as a Symbol first -->
<DetectChar attribute="Symbol" context="#stay" char="(" />
<DetectChar attribute="Symbol" context="#pop" char=")" />
<!-- Nested calls: lookahead on name, ( consumed by the rule above -->
<RegExpr attribute="Function" context="Arguments" String="\b[a-zA-Z_]\w*(?=\s*\()" />
<!-- Known keywords/types/constants keep their colors -->
<IncludeRules context="MatchKeywords" />
<!-- Strings and comments work inside args -->
<DetectChar attribute="String" context="StringDQ" char=""" />
<DetectChar attribute="String" context="StringSQ" char="'" />
<StringDetect attribute="Comment" context="LineComment" String="//" />
<Detect2Chars attribute="Comment" context="BlockComment" char="/" char1="*" />
<RegExpr attribute="Number" context="#stay" String="\b[0-9]+(\.[0-9]+)?\b" />
<AnyChar attribute="Symbol" context="#stay" String="{}[]=!<>:+\-*/|&^%;,." />
<!-- Plain identifiers get Argument color -->
<DetectIdentifier />
</context>
</contexts>
<!-- === Style Definitions === -->
<itemDatas>
<itemData name="Preprocessor" defStyleNum="dsPreprocessor" spellChecking="false"/>
<itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false"/>
<itemData name="Control Flow" defStyleNum="dsControlFlow" spellChecking="false"/>
<itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false"/>
<itemData name="Data Type" defStyleNum="dsDataType" spellChecking="false"/>
<itemData name="Constant" defStyleNum="dsConstant" spellChecking="false"/>
<itemData name="Number" defStyleNum="dsDecVal" spellChecking="false"/>
<itemData name="String" defStyleNum="dsString" spellChecking="false"/>
<itemData name="String Escape" defStyleNum="dsSpecialChar" spellChecking="false"/>
<itemData name="Comment" defStyleNum="dsComment" spellChecking="false"/>
<itemData name="Symbol" defStyleNum="dsOperator" spellChecking="false"/>
<itemData name="Error" defStyleNum="dsError" spellChecking="false"/>
<itemData name="Self" defStyleNum="dsBuiltIn" spellChecking="false"/>
<itemData name="Function" defStyleNum="dsFunction" spellChecking="false"/>
<itemData name="Argument" defStyleNum="dsVerbatimString" spellChecking="false"/>
<itemData name="Scope" defStyleNum="dsPreprocessor" spellChecking="false"/>
</itemDatas>
</highlighting>
<general>
<comments>
<comment name="singleLine" start="//" />
<comment name="multiLine" start="/*" end="*/" />
</comments>
<keywords casesensitive="0" />
<folding>
<beginRegion regexp="\{" />
<endRegion regexp="\}" />
</folding>
</general>
</language>