@@ -62,21 +62,26 @@ endif
62
62
unlet ! s: key
63
63
delfunction s: syntax_keyword
64
64
65
+ syntax match clojureKeywordNs contained " \v [^/ :']+\z e/"
66
+ syntax match clojureKeywordNsSeparator contained " /"
67
+ syntax match clojureKeywordNsColon contained " \v <:{1,2}"
65
68
" Keywords are symbols:
66
69
" static Pattern symbolPat = Pattern.compile("[:]?([\\D&&[^/]].*/)?([\\D&&[^/]][^/]*)");
67
70
" But they:
68
71
" * Must not end in a : or /
69
72
" * Must not have two adjacent colons except at the beginning
70
73
" * 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
72
75
73
76
syntax match clojureStringEscape " \v\\ %([\\ btnfr"]|u\x {4}|[0-3]\o {2}|\o {1,2})" contained
74
77
75
78
syntax region clojureString matchgroup =clojureStringDelimiter start =/ "/ skip =/ \\\\\|\\ "/ end =/ "/ contains =clojureStringEscape,@Spell
76
79
77
80
syntax match clojureCharacter " \v\\ %(o%([0-3]\o {2}|\o {1,2})|u\x {4}|newline|tab|space|return|backspace|formfeed|.)"
78
81
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
80
85
81
86
" NB. Correct matching of radix literals was removed for better performance.
82
87
syntax 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
162
167
highlight default link clojureConstant Constant
163
168
highlight default link clojureBoolean Boolean
164
169
highlight default link clojureCharacter Character
165
- highlight default link clojureKeyword Keyword
166
170
highlight default link clojureNumber Number
167
171
highlight default link clojureString String
168
172
highlight default link clojureStringDelimiter String
169
173
highlight default link clojureStringEscape Character
170
174
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
+
171
181
highlight default link clojureRegexp Constant
172
182
highlight default link clojureRegexpDelimiter Constant
173
183
highlight default link clojureRegexpEscape Character
0 commit comments