2021-05-01 20:21:50 -07:00
|
|
|
" Vim indent file
|
|
|
|
" Language: Clojure
|
|
|
|
" Maintainer: Alex Vear <av@axvr.io>
|
|
|
|
" Former Maintainers: Sung Pae <self@sungpae.com>
|
|
|
|
" Meikel Brandmeyer <mb@kotka.de>
|
|
|
|
" Toralf Wittner <toralf.wittner@gmail.com>
|
|
|
|
" Contributors: Joel Holdbrooks <cjholdbrooks@gmail.com> (Regexp support, bug fixes)
|
|
|
|
" URL: https://github.com/clojure-vim/clojure.vim
|
|
|
|
" License: Vim (see :h license)
|
|
|
|
" Last Change: 2021-02-13
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
if exists("b:current_syntax")
|
|
|
|
finish
|
|
|
|
endif
|
|
|
|
|
2016-12-10 02:49:33 -07:00
|
|
|
let s:cpo_sav = &cpo
|
|
|
|
set cpo&vim
|
|
|
|
|
2014-07-10 21:05:51 -07:00
|
|
|
if has("folding") && exists("g:clojure_fold") && g:clojure_fold > 0
|
|
|
|
setlocal foldmethod=syntax
|
|
|
|
endif
|
|
|
|
|
|
|
|
" -*- KEYWORDS -*-
|
2021-05-01 20:21:50 -07:00
|
|
|
" Generated from https://github.com/clojure-vim/clojure.vim/blob/f8594e7030cdfb0b7990ac92953c77a08a7220f0/clj/src/vim_clojure_static/generate.clj
|
|
|
|
" Clojure version 1.10.2
|
2016-12-10 02:49:33 -07:00
|
|
|
let s:clojure_syntax_keywords = {
|
|
|
|
\ 'clojureBoolean': ["false","true"]
|
|
|
|
\ , 'clojureCond': ["case","clojure.core/case","clojure.core/cond","clojure.core/cond->","clojure.core/cond->>","clojure.core/condp","clojure.core/if-let","clojure.core/if-not","clojure.core/if-some","clojure.core/when","clojure.core/when-first","clojure.core/when-let","clojure.core/when-not","clojure.core/when-some","cond","cond->","cond->>","condp","if-let","if-not","if-some","when","when-first","when-let","when-not","when-some"]
|
|
|
|
\ , 'clojureConstant': ["nil"]
|
|
|
|
\ , 'clojureDefine': ["clojure.core/definline","clojure.core/definterface","clojure.core/defmacro","clojure.core/defmethod","clojure.core/defmulti","clojure.core/defn","clojure.core/defn-","clojure.core/defonce","clojure.core/defprotocol","clojure.core/defrecord","clojure.core/defstruct","clojure.core/deftype","definline","definterface","defmacro","defmethod","defmulti","defn","defn-","defonce","defprotocol","defrecord","defstruct","deftype"]
|
|
|
|
\ , 'clojureException': ["catch","finally","throw","try"]
|
2021-05-01 20:21:50 -07:00
|
|
|
\ , 'clojureFunc': ["*","*'","+","+'","-","-'","->ArrayChunk","->Eduction","->Vec","->VecNode","->VecSeq","-cache-protocol-fn","-reset-methods","/","<","<=","=","==",">",">=","PrintWriter-on","StackTraceElement->vec","Throwable->map","accessor","aclone","add-classpath","add-tap","add-watch","agent","agent-error","agent-errors","aget","alength","alias","all-ns","alter","alter-meta!","alter-var-root","ancestors","any?","apply","array-map","aset","aset-boolean","aset-byte","aset-char","aset-double","aset-float","aset-int","aset-long","aset-short","assoc","assoc!","assoc-in","associative?","atom","await","await-for","await1","bases","bean","bigdec","bigint","biginteger","bit-and","bit-and-not","bit-clear","bit-flip","bit-not","bit-or","bit-set","bit-shift-left","bit-shift-right","bit-test","bit-xor","boolean","boolean-array","boolean?","booleans","bound-fn*","bound?","bounded-count","butlast","byte","byte-array","bytes","bytes?","case-fallthrough-err-impl","cast","cat","char","char-array","char?","chars","chunk","chunk-append","chunk-buffer","chunk-cons","chunk-first","chunk-next","chunk-rest","chunked-seq?","class","class?","clear-agent-errors","clojure-version","clojure.core/*","clojure.core/*'","clojure.core/+","clojure.core/+'","clojure.core/-","clojure.core/-'","clojure.core/->ArrayChunk","clojure.core/->Eduction","clojure.core/->Vec","clojure.core/->VecNode","clojure.core/->VecSeq","clojure.core/-cache-protocol-fn","clojure.core/-reset-methods","clojure.core//","clojure.core/<","clojure.core/<=","clojure.core/=","clojure.core/==","clojure.core/>","clojure.core/>=","clojure.core/PrintWriter-on","clojure.core/StackTraceElement->vec","clojure.core/Throwable->map","clojure.core/accessor","clojure.core/aclone","clojure.core/add-classpath","clojure.core/add-tap","clojure.core/add-watch","clojure.core/agent","clojure.core/agent-error","clojure.core/agent-errors","clojure.core/aget","clojure.core/alength","clojure.core/alias","clojure.core/all-ns","clojure.core/alter","clojure.core/alter-meta!","clojure.core/alter-var-root","clojure.core/ancestors","clojure.core/any?","clojure.core/apply","clojure.core/array-map","clojure.core/aset","clojure.core/aset-boolean","clojure.core/aset-byte","clojure.core/aset-char","clojure.core/aset-double","clojure.core/aset-float","clojure.core/aset-int","clojure.core/aset-long","clojure.core/aset-short","clojure.core/assoc","clojure.core/assoc!","clojure.core/assoc-in","clojure.core/associative?","clojure.core/atom","clojure.core/await","clojure.core/await-for","clojure.core/await1","clojure.core/bases","clojure.core/bean","clojure.core/bigdec","clojure.core/bigint","clojure.core/biginteger","clojure.core/bit-and","clojure.core/bit-and-not","clojure.core/bit-clear","clojure.core/bit-flip","clojure.core/bit-not","clojure.core/bit-or","clojure.core/bit-set","clojure.core/bit-shift-left","clojure.core/bit-shift-right","clojure.core/bit-test","clojure.core/bit-xor","clojure.core/boolean","clojure.core/boolean-array","clojure.core/boolean?","clojure.core/booleans","clojure.core/bound-fn*","clojure.core/bound?","clojure.core/bounded-count","clojure.core/butlast","clojure.core/byte","clojure.core/byte-array","clojure.core/bytes","clojure.core/bytes?","clojure.core/case-fallthrough-err-impl","clojure.core/cast","clojure.core/cat","clojure.core/char","clojure.core/char-array","clojure.core/char?","clojure.core/chars","clojure.core/chunk","clojure.core/chunk-append","clojure.core/chunk-buffer","clojure.core/chunk-cons","clojure.core/chunk-first","clojure.core/chunk-next","clojure.core/chunk-rest","clojure.core/chunked-seq?","clojure.core/class","clojure.core/class?","clojure.core/clear-agent-errors","clojure.core/clojure-version","clojure.core/coll?","clojure.core/commute","clojure.core/comp","clojure.core/comparator","clojure.core/compare","clojure.core/compare-and-set!","clojure.core/compile","clojure.core/complement","clojure.core/completing","clojure.core/concat","clojure.core/conj","clojure.core/conj!","clojure.core/cons","clojure.core/constantly","clojure.core/construct-proxy","clojure.core/con
|
2016-12-10 02:49:33 -07:00
|
|
|
\ , 'clojureMacro': ["->","->>","..","amap","and","areduce","as->","assert","binding","bound-fn","clojure.core/->","clojure.core/->>","clojure.core/..","clojure.core/amap","clojure.core/and","clojure.core/areduce","clojure.core/as->","clojure.core/assert","clojure.core/binding","clojure.core/bound-fn","clojure.core/comment","clojure.core/declare","clojure.core/delay","clojure.core/dosync","clojure.core/doto","clojure.core/extend-protocol","clojure.core/extend-type","clojure.core/for","clojure.core/future","clojure.core/gen-class","clojure.core/gen-interface","clojure.core/import","clojure.core/io!","clojure.core/lazy-cat","clojure.core/lazy-seq","clojure.core/letfn","clojure.core/locking","clojure.core/memfn","clojure.core/ns","clojure.core/or","clojure.core/proxy","clojure.core/proxy-super","clojure.core/pvalues","clojure.core/refer-clojure","clojure.core/reify","clojure.core/some->","clojure.core/some->>","clojure.core/sync","clojure.core/time","clojure.core/vswap!","clojure.core/with-bindings","clojure.core/with-in-str","clojure.core/with-loading-context","clojure.core/with-local-vars","clojure.core/with-open","clojure.core/with-out-str","clojure.core/with-precision","clojure.core/with-redefs","comment","declare","delay","dosync","doto","extend-protocol","extend-type","for","future","gen-class","gen-interface","import","io!","lazy-cat","lazy-seq","letfn","locking","memfn","ns","or","proxy","proxy-super","pvalues","refer-clojure","reify","some->","some->>","sync","time","vswap!","with-bindings","with-in-str","with-loading-context","with-local-vars","with-open","with-out-str","with-precision","with-redefs"]
|
|
|
|
\ , 'clojureRepeat': ["clojure.core/doseq","clojure.core/dotimes","clojure.core/while","doseq","dotimes","while"]
|
|
|
|
\ , 'clojureSpecial': [".","clojure.core/fn","clojure.core/let","clojure.core/loop","def","do","fn","if","let","loop","monitor-enter","monitor-exit","new","quote","recur","set!","var"]
|
2021-05-01 20:21:50 -07:00
|
|
|
\ , 'clojureVariable': ["*1","*2","*3","*agent*","*allow-unresolved-vars*","*assert*","*clojure-version*","*command-line-args*","*compile-files*","*compile-path*","*compiler-options*","*data-readers*","*default-data-reader-fn*","*e","*err*","*file*","*flush-on-newline*","*fn-loader*","*in*","*math-context*","*ns*","*out*","*print-dup*","*print-length*","*print-level*","*print-meta*","*print-namespace-maps*","*print-readably*","*read-eval*","*reader-resolver*","*source-path*","*suppress-read*","*unchecked-math*","*use-context-classloader*","*verbose-defrecords*","*warn-on-reflection*","EMPTY-NODE","Inst","char-escape-string","char-name-string","clojure.core/*1","clojure.core/*2","clojure.core/*3","clojure.core/*agent*","clojure.core/*allow-unresolved-vars*","clojure.core/*assert*","clojure.core/*clojure-version*","clojure.core/*command-line-args*","clojure.core/*compile-files*","clojure.core/*compile-path*","clojure.core/*compiler-options*","clojure.core/*data-readers*","clojure.core/*default-data-reader-fn*","clojure.core/*e","clojure.core/*err*","clojure.core/*file*","clojure.core/*flush-on-newline*","clojure.core/*fn-loader*","clojure.core/*in*","clojure.core/*math-context*","clojure.core/*ns*","clojure.core/*out*","clojure.core/*print-dup*","clojure.core/*print-length*","clojure.core/*print-level*","clojure.core/*print-meta*","clojure.core/*print-namespace-maps*","clojure.core/*print-readably*","clojure.core/*read-eval*","clojure.core/*reader-resolver*","clojure.core/*source-path*","clojure.core/*suppress-read*","clojure.core/*unchecked-math*","clojure.core/*use-context-classloader*","clojure.core/*verbose-defrecords*","clojure.core/*warn-on-reflection*","clojure.core/EMPTY-NODE","clojure.core/Inst","clojure.core/char-escape-string","clojure.core/char-name-string","clojure.core/default-data-readers","clojure.core/primitives-classnames","clojure.core/unquote","clojure.core/unquote-splicing","default-data-readers","primitives-classnames","unquote","unquote-splicing"]
|
2016-12-10 02:49:33 -07:00
|
|
|
\ }
|
|
|
|
|
|
|
|
function! s:syntax_keyword(dict)
|
|
|
|
for key in keys(a:dict)
|
|
|
|
execute 'syntax keyword' key join(a:dict[key], ' ')
|
|
|
|
endfor
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
if exists('b:clojure_syntax_without_core_keywords') && b:clojure_syntax_without_core_keywords
|
|
|
|
" Only match language specials and primitives
|
|
|
|
for s:key in ['clojureBoolean', 'clojureConstant', 'clojureException', 'clojureSpecial']
|
|
|
|
execute 'syntax keyword' s:key join(s:clojure_syntax_keywords[s:key], ' ')
|
|
|
|
endfor
|
|
|
|
else
|
|
|
|
call s:syntax_keyword(s:clojure_syntax_keywords)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if exists('g:clojure_syntax_keywords')
|
|
|
|
call s:syntax_keyword(g:clojure_syntax_keywords)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if exists('b:clojure_syntax_keywords')
|
|
|
|
call s:syntax_keyword(b:clojure_syntax_keywords)
|
|
|
|
endif
|
|
|
|
|
|
|
|
unlet! s:key
|
|
|
|
delfunction s:syntax_keyword
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
" Keywords are symbols:
|
|
|
|
" static Pattern symbolPat = Pattern.compile("[:]?([\\D&&[^/]].*/)?([\\D&&[^/]][^/]*)");
|
|
|
|
" But they:
|
|
|
|
" * Must not end in a : or /
|
|
|
|
" * Must not have two adjacent colons except at the beginning
|
|
|
|
" * Must not contain any reader metacharacters except for ' and #
|
|
|
|
syntax match clojureKeyword "\v<:{1,2}%([^ \n\r\t()\[\]{}";@^`~\\%/]+/)*[^ \n\r\t()\[\]{}";@^`~\\%/]+:@<!>"
|
|
|
|
|
|
|
|
syntax match clojureStringEscape "\v\\%([\\btnfr"]|u\x{4}|[0-3]\o{2}|\o{1,2})" contained
|
|
|
|
|
2016-12-10 02:49:33 -07:00
|
|
|
syntax region clojureString matchgroup=clojureStringDelimiter start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=clojureStringEscape,@Spell
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
syntax match clojureCharacter "\\."
|
|
|
|
syntax match clojureCharacter "\\o\%([0-3]\o\{2\}\|\o\{1,2\}\)"
|
|
|
|
syntax match clojureCharacter "\\u\x\{4\}"
|
|
|
|
syntax match clojureCharacter "\\space"
|
|
|
|
syntax match clojureCharacter "\\tab"
|
|
|
|
syntax match clojureCharacter "\\newline"
|
|
|
|
syntax match clojureCharacter "\\return"
|
|
|
|
syntax match clojureCharacter "\\backspace"
|
|
|
|
syntax match clojureCharacter "\\formfeed"
|
|
|
|
|
|
|
|
syntax match clojureSymbol "\v%([a-zA-Z!$&*_+=|<.>?-]|[^\x00-\x7F])+%(:?%([a-zA-Z0-9!#$%&*_+=|'<.>/?-]|[^\x00-\x7F]))*[#:]@<!"
|
|
|
|
|
|
|
|
let s:radix_chars = "0123456789abcdefghijklmnopqrstuvwxyz"
|
|
|
|
for s:radix in range(2, 36)
|
|
|
|
execute 'syntax match clojureNumber "\v\c<[-+]?' . s:radix . 'r[' . strpart(s:radix_chars, 0, s:radix) . ']+>"'
|
|
|
|
endfor
|
|
|
|
unlet! s:radix_chars s:radix
|
|
|
|
|
|
|
|
syntax match clojureNumber "\v<[-+]?%(0\o*|0x\x+|[1-9]\d*)N?>"
|
|
|
|
syntax match clojureNumber "\v<[-+]?%(0|[1-9]\d*|%(0|[1-9]\d*)\.\d*)%(M|[eE][-+]?\d+)?>"
|
|
|
|
syntax match clojureNumber "\v<[-+]?%(0|[1-9]\d*)/%(0|[1-9]\d*)>"
|
|
|
|
|
|
|
|
syntax match clojureVarArg "&"
|
|
|
|
|
|
|
|
syntax match clojureQuote "'"
|
|
|
|
syntax match clojureQuote "`"
|
|
|
|
syntax match clojureUnquote "\~"
|
|
|
|
syntax match clojureUnquote "\~@"
|
|
|
|
syntax match clojureMeta "\^"
|
|
|
|
syntax match clojureDeref "@"
|
|
|
|
syntax match clojureDispatch "\v#[\^'=<_]?"
|
|
|
|
|
2016-12-10 02:49:33 -07:00
|
|
|
" Clojure permits no more than 20 anonymous params.
|
2014-07-10 21:05:51 -07:00
|
|
|
syntax match clojureAnonArg "%\(20\|1\d\|[1-9]\|&\)\?"
|
|
|
|
|
|
|
|
syntax match clojureRegexpEscape "\v\\%([\\tnrfae.()\[\]{}^$*?+]|c\u|0[0-3]?\o{1,2}|x%(\x{2}|\{\x{1,6}\})|u\x{4})" contained display
|
|
|
|
syntax region clojureRegexpQuoted start=/\\Q/ms=e+1 skip=/\\\\\|\\"/ end=/\\E/me=s-1 end=/"/me=s-1 contained
|
|
|
|
syntax region clojureRegexpQuote start=/\\Q/ skip=/\\\\\|\\"/ end=/\\E/ end=/"/me=s-1 contains=clojureRegexpQuoted keepend contained
|
|
|
|
|
|
|
|
" -*- CHARACTER PROPERTY CLASSES -*-
|
2021-05-01 20:21:50 -07:00
|
|
|
" Generated from https://github.com/clojure-vim/clojure.vim/blob/f8594e7030cdfb0b7990ac92953c77a08a7220f0/clj/src/vim_clojure_static/generate.clj
|
|
|
|
" Java version 15.0.2
|
2014-07-10 21:05:51 -07:00
|
|
|
syntax match clojureRegexpPosixCharClass "\v\\[pP]\{%(Cntrl|A%(l%(pha|num)|SCII)|Space|Graph|Upper|P%(rint|unct)|Blank|XDigit|Digit|Lower)\}" contained display
|
|
|
|
syntax match clojureRegexpJavaCharClass "\v\\[pP]\{java%(Whitespace|JavaIdentifier%(Part|Start)|SpaceChar|Mirrored|TitleCase|I%(SOControl|de%(ographic|ntifierIgnorable))|D%(efined|igit)|U%(pperCase|nicodeIdentifier%(Part|Start))|L%(etter%(OrDigit)?|owerCase)|Alphabetic)\}" contained display
|
2016-12-10 02:49:33 -07:00
|
|
|
syntax match clojureRegexpUnicodeCharClass "\v\\[pP]\{\cIs%(l%(owercase|etter)|hex%(digit|_digit)|w%(hite%(_space|space)|ord)|noncharacter%(_code_point|codepoint)|p%(rint|unctuation)|ideographic|graph|a%(l%(num|phabetic)|ssigned)|uppercase|join%(control|_control)|titlecase|blank|digit|control)\}" contained display
|
2014-07-10 21:05:51 -07:00
|
|
|
syntax match clojureRegexpUnicodeCharClass "\v\\[pP][NSCMZPL]" contained display
|
|
|
|
syntax match clojureRegexpUnicodeCharClass "\v\\[pP]\{%(N[dlo]?|P[dcifeos]?|C[ncfos]?|M[nce]?|Z[lsp]?|S[mcko]?|L[muCDlto]?)\}" contained display
|
|
|
|
syntax match clojureRegexpUnicodeCharClass "\v\\[pP]\{%(Is|gc\=|general_category\=)?%(N[dlo]?|P[dcifeos]?|C[ncfos]?|M[nce]?|Z[lsp]?|S[mcko]?|L[muCDlto]?)\}" contained display
|
2021-05-01 20:21:50 -07:00
|
|
|
syntax match clojureRegexpUnicodeCharClass "\v\\[pP]\{\c%(Is|sc\=|script\=)%(k%(its|h%(oj%(ki)?|m%(r|er)|itan_small_script|udawadi|ar%(oshthi)?)|a%(li|n%(a|nada)|takana%(_or_hiragana)?|yah_li|ithi)|nda|thi)|r%(ohg|un%(ic|r)|ejang|jng)|l%(epc%(ha)?|i%(mbu?|n%([ab]|ear_[ab])|su)|y%([dc]i%(an)?)|a%(t%(n|in)|na|oo?))|t%(elu%(gu)?|ha%(i|a%(na)?)|i%(finagh|rh%(uta)?|b%(t|etan))|fng|glg|a%(i_%(le|tham|viet)|g%(alog|b%(anwa)?)|vt|kri?|ng%(ut)?|l[ue]|m%(il|l)))|vaii?|y%(i%(ii)?|ezi%(di)?)|e%(thi%(opic)?|l%(ym%(aic)?|ba%(san)?)|gyp%(tian_hieroglyphs)?)|u%(gar%(itic)?|nknown)|h%(ung|ira%(gana)?|rkt|mn[gp]|a%(n%(i%(fi_rohingya)?|unoo|o|g%(ul)?)?|tr%(an)?)|luw|ebr%(ew)?)|g%(r%(e%(k|ek)|an%(tha)?)|lag%(olitic)?|eor%(gian)?|o%(n[mg]|th%(ic)?)|u%(j%(arati|r)|r%(u|mukhi)|njala_gondi))|m%(lym|a%(n%(d%(aic)?|i%(chaean)?)|saram_gondi|h%(ajani|j)|ka%(sar)?|rc%(hen)?|layalam)|o%(di|ng%(olian)?)|e%(r%(c|o%(itic_%(hieroglyphs|cursive))?)|etei_mayek|nd%(e_kikakui)?|d%(f|efaidrin))|roo?|y%(anmar|mr)|tei|iao|ult%(ani)?)|d%(upl%(oyan)?|srt|i%(ak|ves_akuru)|ogra?|e%(seret|va%(nagari)?))|z%(an%(abazar_square|b)|inh|yyy|zzz)|n%(yiakeng_puachue_hmong|bat|koo?|ew%(_tai_lue|a)|ushu|shu|a%(bataean|rb|nd%(inagari)?))|s%(h%(rd|a%(vian|rada|w))|o%(yo%(mbo)?|g%(d%(ian)?|o)|ra%(_sompeng)?)|i%(n%(d|h%(ala)?)|dd%(ham)?|gnwriting)|a%(ur%(ashtra)?|m%(r|aritan)|rb)|y%(r%(c|iac)|lo%(ti_nagri)?)|und%(anese)?|gnw)|w%(cho|a%(ncho|ra%(ng_citi)?))|c%(y%(priot|r%(l|illic))|h%(er%(okee)?|a%(m|kma)|rs|orasmian)|a%(km|ucasian_albanian|n%(adian_aboriginal|s)|ri%(an)?)|prt|uneiform|o%(pt%(ic)?|mmon))|i%(n%(scriptional_pa%(rthian|hlavi)|herited)|mperial_aramaic|tal)|p%(h%(l[ip]|oenician|ag%(s_pa)?|nx)|a%(lm%(yrene)?|u%(_cin_hau|c)|hawh_hmong)|rti|salter_pahlavi|lrd|erm)|x%(peo|sux)|b%(eng%(ali)?|ra%(i%(lle)?|h%(mi)?)|opo%(mofo)?|u%(gi%(nese)?|h%(d|id))|h%(ks|aiksuki)|a%(ss%(a_vah)?|t%(ak|k)|li%(nese)?|mum?))|java%(nese)?|o%(g%(am|ham)|s%(age|ge|ma%(nya)?)|l%(d_%(hungarian|north_arabian|so%(gdian|uth_arabian)|per%(mic|sian)|italic|turkic)|ck|_chiki)|r%(iya|kh|ya))|a%(r%(ab%(ic)?|m%([ni]|enian))|dl%(m|am)|natolian_hieroglyphs|hom|v%(st|estan)|ghb))\}" contained display
|
|
|
|
syntax match clojureRegexpUnicodeCharClass "\v\\[pP]\{\c%(In|blk\=|block\=)%(zanabazar%([ _]square|square)|javanese|h%(a%(lfwidth%( and fullwidth forms|andfullwidthforms|_and_fullwidth_forms)|tran|n%(unoo|gul%(compatibilityjamo|syllables|jamo%(extended\-[ab])?|_%(syllables|jamo%(_extended_[ab])?|compatibility_jamo)| %(syllables|compatibility jamo|jamo%( extended\-[ab])?))|ifi%([_ ]rohingya|rohingya)))|i%(ragana|gh%( %(private use surrogates|surrogates)|_%(private_use_surrogates|surrogates)|surrogates|privateusesurrogates))|ebrew)|i%(pa%([ _]extensions|extensions)|n%(scriptional%(%([ _]pa%(rthian|hlavi))|pa%(rthian|hlavi))|dic%(siyaqnumbers|_siyaq_numbers| siyaq numbers))|deographic%(symbolsandpunctuation|_%(description_characters|symbols_and_punctuation)| %(description characters|symbols and punctuation)|descriptioncharacters)|mperial%(aramaic|[_ ]aramaic))|c%(o%(ntrol%(pictures|[ _]pictures)|ptic%(epactnumbers|_epact_numbers| epact numbers)?|m%(mon%(_indic_number_forms|indicnumberforms| indic number forms)|bining%(halfmarks|_%(diacritical_marks%(_%(supplement|for_symbols|extended))?|marks_for_symbols|half_marks)| %(half marks|diacritical marks%( %(supplement|for symbols|extended))?|marks for symbols)|diacriticalmarks%(supplement|forsymbols|extended)?|marksforsymbols))|unting%( rod numerals|_rod_numerals|rodnumerals))|a%(rian|ucasian%([ _]albanian|albanian))|jk%(unifiedideographs%(extension[dgacfbe])?|s%(ymbolsandpunctuation|trokes)|_%(s%(trokes|ymbols_and_punctuation)|radicals_supplement|unified_ideographs%(_extension_[dgacfbe])?|compatibility%(_%(forms|ideographs%(_supplement)?))?)|compatibility%(forms|ideographs%(supplement)?)?|radicalssupplement| %(compatibility%( %(ideographs%( supplement)?|forms))?|unified ideographs%( extension [dgacfbe])?|radicals supplement|s%(ymbols and punctuation|trokes)))|y%(rillic%(supplement%(ary)?| %(supplement%(ary)?|extended\-[acb])|extended\-[acb]|_%(extended_[acb]|supplement%(ary)?))?|priot%(syllabary|[ _]syllabary))|u%(rrency%([_ ]symbols|symbols)|neiform%(_numbers_and_punctuation|numbersandpunctuation| numbers and punctuation)?)|h%(e%(ss%([_ ]symbols|symbols)|rokee%(supplement|[ _]supplement)?)|a%(m|kma)|orasmian))|g%(othic|u%(njala%(gondi|[_ ]gondi)|jarati|rmukhi)|lagolitic%(supplement|[ _]supplement)?|e%(o%(rgian%(supplement|%([_ ]%(supplement|extended))|extended)?|metric%( shapes%( extended)?|shapes%(extended)?|_shapes%(_extended)?))|neral%([_ ]punctuation|punctuation))|r%(eek%( %(and coptic|extended)|andcoptic|_%(and_coptic|extended)|extended)?|antha))|s%(h%(orthand%( format controls|_format_controls|formatcontrols)|a%(vian|rada))|u%(ndanese%(supplement|[ _]supplement)?|p%(erscripts%(_and_subscripts|andsubscripts| and subscripts)|plementa%(ry%(_private_use_area_[ab]|privateusearea\-[ab]| private use area\-[ab])|l%( %(mathematical operators|symbols and pictographs|punctuation|arrows\-[acb])|symbolsandpictographs|mathematicaloperators|punctuation|arrows\-[acb]|_%(arrows_[acb]|symbols_and_pictographs|mathematical_operators|punctuation))))|tton%(signwriting|[_ ]signwriting))|i%(nhala%( archaic numbers|archaicnumbers|_archaic_numbers)?|ddham)|y%(loti%([_ ]nagri|nagri)|mbols%( %(for legacy computing|and pictographs extended\-a)|forlegacycomputing|andpictographsextended\-a|_%(and_pictographs_extended_a|for_legacy_computing))|riac%(supplement|[ _]supplement)?)|p%(acing%(_modifier_letters| modifier letters|modifierletters)|ecials)|a%(maritan|urashtra)|o%(yombo|gdian|ra%(sompeng|[ _]sompeng))|mall%(kanaextension| %(kana extension|form variants)|_%(kana_extension|form_variants)|formvariants))|y%(i%(syllables|%([_ ]%(syllables|radicals))|radicals|jing%(hexagramsymbols| hexagram symbols|_hexagram_symbols))|ezidi)|p%(h%(o%(enician|netic%( extensions%( supplement)?|extensions%(supplement)?|_extensions%(_supplement)?))|a%(istos%([ _]disc|disc)|gs[_\-]pa))|laying%(cards|[_ ]cards)|rivate%(usearea| use area|_use_area)|a%(hawh%(hmong|[_ ]hmong)|u%(_cin_hau|cinhau| cin hau)|lmyrene)|salter%(pahlavi|[ _]pahlavi))|e%(l%(basan|ymaic)|arly%(_dynastic_cuneiform|dynasticcuneiform| dynastic cuneiform)|mo
|
2016-12-10 02:49:33 -07:00
|
|
|
|
|
|
|
syntax match clojureRegexpPredefinedCharClass "\v%(\\[dDsSwW]|\.)" contained display
|
|
|
|
syntax cluster clojureRegexpCharPropertyClasses contains=clojureRegexpPosixCharClass,clojureRegexpJavaCharClass,clojureRegexpUnicodeCharClass
|
|
|
|
syntax cluster clojureRegexpCharClasses contains=clojureRegexpPredefinedCharClass,clojureRegexpCharClass,@clojureRegexpCharPropertyClasses
|
|
|
|
syntax region clojureRegexpCharClass start="\[" skip=/\\\\\|\\]/ end="]" contained contains=clojureRegexpPredefinedCharClass,@clojureRegexpCharPropertyClasses
|
|
|
|
syntax match clojureRegexpBoundary "\\[bBAGZz]" contained display
|
|
|
|
syntax match clojureRegexpBoundary "[$^]" contained display
|
|
|
|
syntax match clojureRegexpQuantifier "[?*+][?+]\=" contained display
|
|
|
|
syntax match clojureRegexpQuantifier "\v\{\d+%(,|,\d+)?}\??" contained display
|
|
|
|
syntax match clojureRegexpOr "|" contained display
|
2021-05-01 20:21:50 -07:00
|
|
|
syntax match clojureRegexpBackRef "\v\\%([1-9]\d*|k\<[a-zA-z]+\>)" contained display
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
" Mode modifiers, mode-modified spans, lookaround, regular and atomic
|
|
|
|
" grouping, and named-capturing.
|
|
|
|
syntax match clojureRegexpMod "\v\(@<=\?:" contained display
|
|
|
|
syntax match clojureRegexpMod "\v\(@<=\?[xdsmiuU]*-?[xdsmiuU]+:?" contained display
|
|
|
|
syntax match clojureRegexpMod "\v\(@<=\?%(\<?[=!]|\>)" contained display
|
|
|
|
syntax match clojureRegexpMod "\v\(@<=\?\<[a-zA-Z]+\>" contained display
|
|
|
|
|
|
|
|
syntax region clojureRegexpGroup start="(" skip=/\\\\\|\\)/ end=")" matchgroup=clojureRegexpGroup contained contains=clojureRegexpMod,clojureRegexpQuantifier,clojureRegexpBoundary,clojureRegexpEscape,@clojureRegexpCharClasses
|
|
|
|
syntax region clojureRegexp start=/\#"/ skip=/\\\\\|\\"/ end=/"/ contains=@clojureRegexpCharClasses,clojureRegexpEscape,clojureRegexpQuote,clojureRegexpBoundary,clojureRegexpQuantifier,clojureRegexpOr,clojureRegexpBackRef,clojureRegexpGroup keepend
|
|
|
|
|
2021-05-01 20:21:50 -07:00
|
|
|
syntax keyword clojureCommentTodo contained FIXME XXX TODO BUG NOTE HACK FIXME: XXX: TODO: BUG: NOTE: HACK:
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
syntax match clojureComment ";.*$" contains=clojureCommentTodo,@Spell
|
|
|
|
syntax match clojureComment "#!.*$"
|
|
|
|
|
|
|
|
" -*- TOP CLUSTER -*-
|
2021-05-01 20:21:50 -07:00
|
|
|
" Generated from https://github.com/clojure-vim/clojure.vim/blob/f8594e7030cdfb0b7990ac92953c77a08a7220f0/clj/src/vim_clojure_static/generate.clj
|
2014-07-10 21:05:51 -07:00
|
|
|
syntax cluster clojureTop contains=@Spell,clojureAnonArg,clojureBoolean,clojureCharacter,clojureComment,clojureCond,clojureConstant,clojureDefine,clojureDeref,clojureDispatch,clojureError,clojureException,clojureFunc,clojureKeyword,clojureMacro,clojureMap,clojureMeta,clojureNumber,clojureQuote,clojureRegexp,clojureRepeat,clojureSexp,clojureSpecial,clojureString,clojureSymbol,clojureUnquote,clojureVarArg,clojureVariable,clojureVector
|
|
|
|
|
2016-12-10 02:49:33 -07:00
|
|
|
syntax region clojureSexp matchgroup=clojureParen start="(" end=")" contains=@clojureTop fold
|
|
|
|
syntax region clojureVector matchgroup=clojureParen start="\[" end="]" contains=@clojureTop fold
|
|
|
|
syntax region clojureMap matchgroup=clojureParen start="{" end="}" contains=@clojureTop fold
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
" Highlight superfluous closing parens, brackets and braces.
|
|
|
|
syntax match clojureError "]\|}\|)"
|
|
|
|
|
|
|
|
syntax sync fromstart
|
|
|
|
|
2016-12-10 02:49:33 -07:00
|
|
|
highlight default link clojureConstant Constant
|
|
|
|
highlight default link clojureBoolean Boolean
|
|
|
|
highlight default link clojureCharacter Character
|
|
|
|
highlight default link clojureKeyword Keyword
|
|
|
|
highlight default link clojureNumber Number
|
|
|
|
highlight default link clojureString String
|
|
|
|
highlight default link clojureStringDelimiter String
|
|
|
|
highlight default link clojureStringEscape Character
|
|
|
|
|
|
|
|
highlight default link clojureRegexp Constant
|
|
|
|
highlight default link clojureRegexpEscape Character
|
|
|
|
highlight default link clojureRegexpCharClass SpecialChar
|
|
|
|
highlight default link clojureRegexpPosixCharClass clojureRegexpCharClass
|
|
|
|
highlight default link clojureRegexpJavaCharClass clojureRegexpCharClass
|
|
|
|
highlight default link clojureRegexpUnicodeCharClass clojureRegexpCharClass
|
|
|
|
highlight default link clojureRegexpPredefinedCharClass clojureRegexpCharClass
|
|
|
|
highlight default link clojureRegexpBoundary SpecialChar
|
|
|
|
highlight default link clojureRegexpQuantifier SpecialChar
|
|
|
|
highlight default link clojureRegexpMod SpecialChar
|
|
|
|
highlight default link clojureRegexpOr SpecialChar
|
|
|
|
highlight default link clojureRegexpBackRef SpecialChar
|
|
|
|
highlight default link clojureRegexpGroup clojureRegexp
|
|
|
|
highlight default link clojureRegexpQuoted clojureString
|
|
|
|
highlight default link clojureRegexpQuote clojureRegexpBoundary
|
|
|
|
|
|
|
|
highlight default link clojureVariable Identifier
|
|
|
|
highlight default link clojureCond Conditional
|
|
|
|
highlight default link clojureDefine Define
|
|
|
|
highlight default link clojureException Exception
|
|
|
|
highlight default link clojureFunc Function
|
|
|
|
highlight default link clojureMacro Macro
|
|
|
|
highlight default link clojureRepeat Repeat
|
|
|
|
|
|
|
|
highlight default link clojureSpecial Special
|
|
|
|
highlight default link clojureVarArg Special
|
|
|
|
highlight default link clojureQuote SpecialChar
|
|
|
|
highlight default link clojureUnquote SpecialChar
|
|
|
|
highlight default link clojureMeta SpecialChar
|
|
|
|
highlight default link clojureDeref SpecialChar
|
|
|
|
highlight default link clojureAnonArg SpecialChar
|
|
|
|
highlight default link clojureDispatch SpecialChar
|
|
|
|
|
|
|
|
highlight default link clojureComment Comment
|
|
|
|
highlight default link clojureCommentTodo Todo
|
|
|
|
|
|
|
|
highlight default link clojureError Error
|
|
|
|
|
|
|
|
highlight default link clojureParen Delimiter
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
let b:current_syntax = "clojure"
|
|
|
|
|
2016-12-10 02:49:33 -07:00
|
|
|
let &cpo = s:cpo_sav
|
|
|
|
unlet! s:cpo_sav
|
|
|
|
|
|
|
|
" vim:sts=8:sw=8:ts=8:noet
|