@@ -62,21 +62,26 @@ endif
6262unlet ! s: key
6363delfunction s: syntax_keyword
6464
65+ syntax match clojureKeywordNs contained " \v [^/ :']+\z e/"
66+ syntax match clojureKeywordNsSeparator contained " /"
67+ syntax match clojureKeywordNsColon contained " \v <:{1,2}"
6568" Keywords are symbols:
6669" static Pattern symbolPat = Pattern.compile("[:]?([\\D&&[^/]].*/)?([\\D&&[^/]][^/]*)");
6770" But they:
6871" * Must not end in a : or /
6972" * Must not have two adjacent colons except at the beginning
7073" * Must not contain any reader metacharacters except for ' and #
71- syntax match clojureKeyword " \v <:{1,2}([^ \n\r\t ()\[\] {}";@^`~\\ /]+/)*[^ \n\r\t ()\[\] {}";@^`~\\ /]+:@1<!>"
74+ syntax match clojureKeyword " \v <:{1,2}([^ \n\r\t ()\[\] {}";@^`~\\ /]+/)*[^ \n\r\t ()\[\] {}";@^`~\\ /]+:@1<!>" contains = clojureKeywordNs,clojureKeywordNsSeparator,clojureKeywordNsColon
7275
7376syntax match clojureStringEscape " \v\\ %([\\ btnfr"]|u\x {4}|[0-3]\o {2}|\o {1,2})" contained
7477
7578syntax region clojureString matchgroup =clojureStringDelimiter start =/ "/ skip =/ \\\\\|\\ "/ end =/ "/ contains =clojureStringEscape,@Spell
7679
7780syntax match clojureCharacter " \v\\ %(o%([0-3]\o {2}|\o {1,2})|u\x {4}|newline|tab|space|return|backspace|formfeed|.)"
7881
79- syntax match clojureSymbol " \v %([a-zA-Z!$&*_+=|<.>?-]|[^\x 00-\x 7F])+%(:?%([a-zA-Z0-9!#$%&*_+=|'<.>/?-]|[^\x 00-\x 7F]))*[#:]@1<!"
82+ syntax match clojureSymbolNs contained " \v [^/ :']+\z e/"
83+ syntax match clojureSymbolNsSeparator contained " /"
84+ syntax match clojureSymbol " \v %([a-zA-Z!$&*_+=|<.>?-]|[^\x 00-\x 7F])+%(:?%([a-zA-Z0-9!#$%&*_+=|'<.>/?-]|[^\x 00-\x 7F]))*[#:]@1<!" contains =clojureSymbolNs,clojureSymbolNsSeparator
8085
8186" NB. Correct matching of radix literals was removed for better performance.
8287syntax match clojureNumber " \v <[-+]?%(%([2-9]|[12]\d |3[0-6])[rR][[:alnum:]]+|%(0\o *|0x\x +|[1-9]\d *)N?|%(0|[1-9]\d *|%(0|[1-9]\d *)\.\d *)%(M|[eE][-+]?\d +)?|%(0|[1-9]\d *)/%(0|[1-9]\d *))>"
@@ -162,12 +167,17 @@ syntax sync fromstart
162167highlight default link clojureConstant Constant
163168highlight default link clojureBoolean Boolean
164169highlight default link clojureCharacter Character
165- highlight default link clojureKeyword Keyword
166170highlight default link clojureNumber Number
167171highlight default link clojureString String
168172highlight default link clojureStringDelimiter String
169173highlight default link clojureStringEscape Character
170174
175+ highlight default link clojureKeyword Keyword
176+ highlight default link clojureKeywordNsColon clojureKeyword
177+ highlight default link clojureKeywordNs clojureKeyword
178+
179+ highlight default link clojureSymbolNs clojureSymbol
180+
171181highlight default link clojureRegexp Constant
172182highlight default link clojureRegexpDelimiter Constant
173183highlight default link clojureRegexpEscape Character
0 commit comments