robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
9bb046d1be
master
1" Vim syntax file 2" Language: Lisp 3" Maintainer: This runtime file is looking for a new maintainer. 4" Former Maintainer: Charles E. Campbell 5" Last Change: Nov 10, 2021 6" 2024 Feb 19 by Vim Project (announce adoption) 7" Version: 31 8" Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_LISP 9" 10" Thanks to F Xavier Noria for a list of 978 Common Lisp symbols taken from HyperSpec 11" Clisp additions courtesy of http://clisp.cvs.sourceforge.net/*checkout*/clisp/clisp/emacs/lisp.vim 12 13" --------------------------------------------------------------------- 14" Load Once: {{{1 15if exists ( "b:current_syntax" ) 16finish 17endif 18 19if exists ( "g:lisp_isk" ) 20exe "setl isk=" . g: lisp_isk 21elseif ( v: version == 704 && has ( "patch-7.4.1142" )) || v: version > 704 22syn iskeyword 38,42,43,45,47-58,60-62,64-90,97-122,_ 23else 24setl isk = 38,42,43,45,47-58,60-62,64-90,97-122,_ 25endif 26 27if exists ( "g:lispsyntax_ignorecase" ) || exists ( "g:lispsyntax_clisp" ) 28set ignorecase 29endif 30 31" --------------------------------------------------------------------- 32" Clusters: {{{1 33syn cluster lispAtomCluster contains = lispAtomBarSymbol , lispAtomList , lispAtomNmbr0 , lispComment , lispDecl , lispFunc , lispLeadWhite 34syn cluster lispBaseListCluster contains = lispAtom , lispAtomBarSymbol , lispAtomMark , lispBQList , lispBarSymbol , lispComment , lispConcat , lispDecl , lispFunc , lispKey , lispList , lispNumber , lispEscapeSpecial , lispSymbol , lispVar , lispLeadWhite 35if exists ( "g:lisp_instring" ) 36syn cluster lispListCluster contains = @lispBaseListCluster , lispString , lispInString , lispInStringString 37else 38syn cluster lispListCluster contains = @lispBaseListCluster , lispString 39endif 40 41syn case ignore 42 43" --------------------------------------------------------------------- 44" Lists: {{{1 45syn match lispSymbol contained ![ ^()'`,"; \t ] \+ ! 46syn match lispBarSymbol contained !|..\{-}| ! 47if exists ( "g:lisp_rainbow" ) && g: lisp_rainbow != 0 48syn region lispParen0 matchgroup = hlLevel0 start = "`\=( "end = ") " skip="|.\{-}|" contains =@lispListCluster,lispParen1 49syn region lispParen1 contained matchgroup = hlLevel1 start = "`\=( "end = ") " skip="|.\{-}|" contains =@lispListCluster,lispParen2 50syn region lispParen2 contained matchgroup = hlLevel2 start = "`\=( "end = ") " skip="|.\{-}|" contains =@lispListCluster,lispParen3 51syn region lispParen3 contained matchgroup = hlLevel3 start = "`\=( "end = ") " skip="|.\{-}|" contains =@lispListCluster,lispParen4 52syn region lispParen4 contained matchgroup = hlLevel4 start = "`\=( "end = ") " skip="|.\{-}|" contains =@lispListCluster,lispParen5 53syn region lispParen5 contained matchgroup = hlLevel5 start = "`\=( "end = ") " skip="|.\{-}|" contains =@lispListCluster,lispParen6 54syn region lispParen6 contained matchgroup = hlLevel6 start = "`\=( "end = ") " skip="|.\{-}|" contains =@lispListCluster,lispParen7 55syn region lispParen7 contained matchgroup = hlLevel7 start = "`\=( "end = ") " skip="|.\{-}|" contains =@lispListCluster,lispParen8 56syn region lispParen8 contained matchgroup = hlLevel8 start = "`\=( "end = ") " skip="|.\{-}|" contains =@lispListCluster,lispParen9 57syn region lispParen9 contained matchgroup = hlLevel9 start = "`\=( "end = ") " skip="|.\{-}|" contains =@lispListCluster,lispParen0 58else 59syn region lispList matchgroup = lispParen start = "( "skip = "|.\{-}| "matchgroup = lispParen end = ") "contains = @lispListCluster 60syn region lispBQList matchgroup = PreProc start = "`( "skip = "|.\{-}| "matchgroup = PreProc end = ") "contains = @lispListCluster 61endif 62 63" --------------------------------------------------------------------- 64" Atoms: {{{1 65syn match lispAtomMark "' " 66syn match lispAtom "'( "me= e-1contains = lispAtomMark nextgroup = lispAtomList 67syn match lispAtom "' [ ^ \t() ] \+ "contains = lispAtomMark 68syn match lispAtomBarSymbol !'|..\{-}| !contains = lispAtomMark 69syn region lispAtom start = +'" +skip = +\\" +end = +" + 70syn region lispAtomList contained matchgroup = Special start = "( "skip = "|.\{-}| "matchgroup = Special end = ") "contains = @lispAtomCluster , lispString , lispEscapeSpecial 71syn match lispAtomNmbr contained "\<\d\+ " 72syn match lispLeadWhite contained "^\s\+ " 73 74" --------------------------------------------------------------------- 75" Standard Lisp Functions and Macros: {{{1 76syn keywordlispFunc < find-method pprint-indent 77syn keywordlispFunc <= find-package pprint-linear 78syn keywordlispFunc = find-restart pprint-logical-block 79syn keywordlispFunc > find-symbol pprint-newline 80syn keywordlispFunc >= finish-output pprint-pop 81syn keywordlispFunc - first pprint-tab 82syn keywordlispFunc / fixnum pprint-tabular 83syn keywordlispFunc /= flet prin1 84syn keywordlispFunc // float prin1-to-string 85syn keywordlispFunc /// float-digits princ 86syn keywordlispFunc * floating-point-inexact princ-to-string 87syn keywordlispFunc ** floating-point-invalid-operation print 88syn keywordlispFunc *** floating-point-overflow print-not-readable 89syn keywordlispFunc + floating-point-underflow print-not-readable-object 90syn keywordlispFunc ++ floatp print-object 91syn keywordlispFunc +++ float-precision print-unreadable-object 92syn keyword lispFunc 1 - float-radix probe-file 93syn keyword lispFunc 1 + float-sign proclaim 94syn keyword lispFunc abort floor prog 95syn keyword lispFunc abs fmakunbound prog * 96syn keyword lispFunc access force -output prog1 97syn keyword lispFunc acons format prog2 98syn keyword lispFunc acos formatter progn 99syn keyword lispFunc acosh fourth program -error 100syn keyword lispFunc add -method fresh-line progv 101syn keyword lispFunc adjoin fround provide 102syn keyword lispFunc adjustable -array-p ftruncate psetf 103syn keyword lispFunc adjust -array ftype psetq 104syn keyword lispFunc allocate -instance funcall push 105syn keyword lispFunc alpha -char-pfunction pushnew 106syn keyword lispFunc alphanumericp function -keywords putprop 107syn keyword lispFunc and function -lambda-expression quote 108syn keyword lispFunc append functionp random 109syn keyword lispFunc apply gbitp random -state 110syn keyword lispFunc applyhook gcd random -state-p 111syn keyword lispFunc apropos generic -function rassoc 112syn keyword lispFunc apropos -list gensym rassoc-if 113syn keyword lispFunc aref gentemp rassoc -if-not 114syn keyword lispFunc arithmetic -error get ratio 115syn keyword lispFunc arithmetic -error-operands get-decoded-time rational 116syn keyword lispFunc arithmetic -error-operation get-dispatch-macro-character rationalize 117syn keyword lispFunc array getf rationalp 118syn keyword lispFunc array -dimension gethash read 119syn keyword lispFunc array -dimension-limit get-internal-real-time read-byte 120syn keyword lispFunc array -dimensions get-internal-run-time read-char 121syn keyword lispFunc array -displacement get-macro-character read-char-no-hang 122syn keyword lispFunc array -element-type get-output-stream-string read-delimited-list 123syn keyword lispFunc array -has-fill-pointer-p get-properties reader-error 124syn keyword lispFunc array -in-bounds-p get-setf-expansion read-eval -print 125syn keyword lispFunc arrayp get -setf-method read-from-string 126syn keyword lispFunc array -rank get-universal-time read-line 127syn keyword lispFunc array -rank-limit go read-preserving-whitespace 128syn keyword lispFunc array -row-major-index graphic-char-p read-sequence 129syn keyword lispFunc array -total-size handler-bind readtable 130syn keyword lispFunc array -total-size-limit handler-case readtable-case 131syn keyword lispFunc ash hash -table readtablep 132syn keyword lispFunc asin hash -table-count real 133syn keyword lispFunc asinh hash -table-p realp 134syn keyword lispFunc assert hash -table-rehash-size realpart 135syn keyword lispFunc assoc hash -table-rehash-threshold reduce 136syn keyword lispFunc assoc -if hash-table-size reinitialize-instance 137syn keyword lispFunc assoc -if-not hash-table-test rem 138syn keyword lispFunc atan host -namestring remf 139syn keyword lispFunc atanh identity remhash 140syn keyword lispFunc atom if remove 141syn keyword lispFunc base -char if-exists remove-duplicates 142syn keyword lispFunc base -string ignorable remove-if 143syn keyword lispFunc bignum ignore remove -if-not 144syn keyword lispFunc bit ignore -errors remove-method 145syn keyword lispFunc bit -and imagpart remprop 146syn keyword lispFunc bit -andc1 import rename-file 147syn keyword lispFunc bit -andc2 incf rename-package 148syn keyword lispFunc bit -eqv initialize-instance replace 149syn keyword lispFunc bit -ior inline require 150syn keyword lispFunc bit -nand in-package rest 151syn keyword lispFunc bit -nor in-package restart 152syn keyword lispFunc bit -not input-stream-p restart-bind 153syn keyword lispFunc bit -orc1 inspect restart-case 154syn keyword lispFunc bit -orc2 int-char restart-name 155syn keyword lispFunc bit -vector integer return 156syn keyword lispFunc bit -vector-p integer-decode-float return-from 157syn keyword lispFunc bit -xor integer-length revappend 158syn keyword lispFunc block integerp reverse 159syn keyword lispFunc boole interactive -stream-p room 160syn keyword lispFunc boole -1 intern rotatef 161syn keyword lispFunc boole -2 internal-time-units-per-second round 162syn keyword lispFunc boolean intersection row -major-aref 163syn keyword lispFunc boole -and invalid-method-error rplaca 164syn keyword lispFunc boole -andc1 invoke-debugger rplacd 165syn keyword lispFunc boole -andc2 invoke-restart safety 166syn keyword lispFunc boole -c1 invoke-restart-interactively satisfies 167syn keyword lispFunc boole -c2 isqrt sbit 168syn keyword lispFunc boole -clr keyword scale-float 169syn keyword lispFunc boole -eqv keywordp schar 170syn keyword lispFunc boole -ior labels search 171syn keyword lispFunc boole -nand lambda second 172syn keyword lispFunc boole -nor lambda-list-keywords sequence 173syn keyword lispFunc boole -orc1 lambda-parameters-limit serious-condition 174syn keyword lispFunc boole -orc2 last set 175syn keyword lispFunc boole -set lcm set-char-bit 176syn keyword lispFunc boole -xor ldb set-difference 177syn keyword lispFunc both -case-p ldb-test set-dispatch-macro-character 178syn keyword lispFunc boundp ldiff set -exclusive-or 179syn keyword lispFunc break least -negative-double-float setf 180syn keyword lispFunc broadcast -stream least-negative-long-float set-macro-character 181syn keyword lispFunc broadcast -stream-streams least-negative-normalized-double-float set-pprint-dispatch 182syn keyword lispFunc built -in-class least-negative-normalized-long-float setq 183syn keyword lispFunc butlast least -negative-normalized-short-float set-syntax-from-char 184syn keyword lispFunc byte least -negative-normalized-single-float seventh 185syn keyword lispFunc byte -position least-negative-short-float shadow 186syn keyword lispFunc byte -size least-negative-single-float shadowing-import 187syn keyword lispFunc call -arguments-limit least-positive-double-float shared-initialize 188syn keyword lispFunc call -method least-positive-long-float shiftf 189syn keyword lispFunc call -next-method least-positive-normalized-double-float short-float 190syn keyword lispFunc capitalize least -positive-normalized-long-float short-float-epsilon 191syn keyword lispFunc car least -positive-normalized-short-float short-float-negative-epsilon 192syn keyword lispFunc case least -positive-normalized-single-float short-site-name 193syn keyword lispFunc catch least -positive-short-float signal 194syn keyword lispFunc ccase least -positive-single-float signed-byte 195syn keyword lispFunc cdr length signum 196syn keyword lispFunc ceiling let simple -array 197syn keyword lispFunc cell -error let* simple-base-string 198syn keyword lispFunc cell -error-name lisp simple-bit-vector 199syn keyword lispFunc cerror lisp -implementation-type simple-bit-vector-p 200syn keyword lispFunc change -class lisp-implementation-version simple-condition 201syn keyword lispFunc char list simple -condition-format-arguments 202syn keyword lispFunc char < list* simple-condition-format-control 203syn keyword lispFunc char <= list-all-packages simple-error 204syn keyword lispFunc char = listen simple-string 205syn keyword lispFunc char > list-length simple-string-p 206syn keyword lispFunc char >= listp simple-type-error 207syn keyword lispFunc char /= load simple-vector 208syn keyword lispFunc character load -logical-pathname-translations simple-vector-p 209syn keyword lispFunc characterp load -time-value simple-warning 210syn keyword lispFunc char -bit locally sin 211syn keyword lispFunc char -bits log single-flaot-epsilon 212syn keyword lispFunc char -bits-limit logand single-float 213syn keyword lispFunc char -code logandc1 single-float-epsilon 214syn keyword lispFunc char -code-limit logandc2 single-float-negative-epsilon 215syn keyword lispFunc char -control-bit logbitp sinh 216syn keyword lispFunc char -downcase logcount sixth 217syn keyword lispFunc char -equal logeqv sleep 218syn keyword lispFunc char -font logical-pathname slot-boundp 219syn keyword lispFunc char -font-limit logical-pathname-translations slot-exists-p 220syn keyword lispFunc char -greaterp logior slot-makunbound 221syn keyword lispFunc char -hyper-bit lognand slot-missing 222syn keyword lispFunc char -int lognor slot-unbound 223syn keyword lispFunc char -lessp lognot slot-value 224syn keyword lispFunc char -meta-bit logorc1 software-type 225syn keyword lispFunc char -name logorc2 software-version 226syn keyword lispFunc char -not-equal logtest some 227syn keyword lispFunc char -not-greaterp logxor sort 228syn keyword lispFunc char -not-lessp long-float space 229syn keyword lispFunc char -super-bit long-float-epsilon special 230syn keyword lispFunc char -upcase long-float-negative-epsilon special-form-p 231syn keyword lispFunc check -type long-site-name special-operator-p 232syn keyword lispFunc cis loop speed 233syn keyword lispFunc class loop -finish sqrt 234syn keyword lispFunc class -name lower-case-p stable-sort 235syn keyword lispFunc class -of machine-instance standard 236syn keyword lispFunc clear -input machine-type standard-char 237syn keyword lispFunc clear -output machine-version standard-char-p 238syn keyword lispFunc close macroexpand standard -class 239syn keyword lispFunc clrhash macroexpand -1 standard-generic-function 240syn keyword lispFunc code -char macroexpand-l standard-method 241syn keyword lispFunc coerce macro -function standard-object 242syn keyword lispFunc commonp macrolet step 243syn keyword lispFunc compilation -speed make-array storage-condition 244syn keyword lispFunc compile make -array store-value 245syn keyword lispFunc compiled -function make-broadcast-stream stream 246syn keyword lispFunc compiled -function -p make-char stream-element-type 247syn keyword lispFunc compile -file make-concatenated-stream stream-error 248syn keyword lispFunc compile -file-pathname make-condition stream-error-stream 249syn keyword lispFunc compiler -let make-dispatch-macro-character stream-external-format 250syn keyword lispFunc compiler -macro make-echo-stream streamp 251syn keyword lispFunc compiler -macro-function make-hash-table streamup 252syn keyword lispFunc complement make -instance string 253syn keyword lispFunc complex make -instances-obsolete string< 254syn keyword lispFunc complexp make -list string<= 255syn keyword lispFunc compute -applicable-methods make-load-form string= 256syn keyword lispFunc compute -restarts make-load-form-saving-slots string> 257syn keyword lispFunc concatenate make -method string>= 258syn keyword lispFunc concatenated -stream make-package string/= 259syn keyword lispFunc concatenated -stream-streams make-pathname string-capitalize 260syn keyword lispFunc cond make -random-state string-char 261syn keyword lispFunc condition make -sequence string-char-p 262syn keyword lispFunc conjugate make -string string-downcase 263syn keyword lispFunc cons make -string-input-stream string-equal 264syn keyword lispFunc consp make -string-output-stream string-greaterp 265syn keyword lispFunc constantly make -symbol string-left-trim 266syn keyword lispFunc constantp make -synonym-stream string-lessp 267syn keyword lispFunc continue make -two-way-stream string-not-equal 268syn keyword lispFunc control -error makunbound string-not-greaterp 269syn keyword lispFunc copy -alist map string-not-lessp 270syn keyword lispFunc copy -list mapc stringp 271syn keyword lispFunc copy -pprint-dispatch mapcan string-right-strim 272syn keyword lispFunc copy -readtable mapcar string-right-trim 273syn keyword lispFunc copy -seq mapcon string-stream 274syn keyword lispFunc copy -structure maphash string-trim 275syn keyword lispFunc copy -symbol map-into string-upcase 276syn keyword lispFunc copy -tree mapl structure 277syn keyword lispFunc cos maplist structure -class 278syn keyword lispFunc cosh mask -field structure-object 279syn keyword lispFunc count max style -warning 280syn keyword lispFunc count -if member sublim 281syn keyword lispFunc count -if-not member-if sublis 282syn keyword lispFunc ctypecase member -if-not subseq 283syn keyword lispFunc debug merge subsetp 284syn keyword lispFunc decf merge -pathname subst 285syn keyword lispFunc declaim merge -pathnames subst-if 286syn keyword lispFunc declaration method subst -if-not 287syn keyword lispFunc declare method -combination substitute 288syn keyword lispFunc decode -float method-combination-error substitute-if 289syn keyword lispFunc decode -universal-time method-qualifiers substitute-if-not 290syn keyword lispFunc defclass min subtypep 291syn keyword lispFunc defconstant minusp svref 292syn keyword lispFunc defgeneric mismatch sxhash 293syn keyword lispFunc define -compiler-macro mod symbol 294syn keyword lispFunc define -condition most-negative-double-float symbol-function 295syn keyword lispFunc define -method-combination most-negative-fixnum symbol-macrolet 296syn keyword lispFunc define -modify-macro most-negative-long-float symbol-name 297syn keyword lispFunc define -setf-expander most-negative-short-float symbolp 298syn keyword lispFunc define -setf-method most-negative-single-float symbol-package 299syn keyword lispFunc define -symbol-macro most-positive-double-float symbol-plist 300syn keyword lispFunc defmacro most -positive-fixnum symbol-value 301syn keyword lispFunc defmethod most -positive-long-float synonym-stream 302syn keyword lispFunc defpackage most -positive-short-float synonym-stream-symbol 303syn keyword lispFunc defparameter most -positive-single-float sys 304syn keyword lispFunc defsetf muffle -warning system 305syn keyword lispFunc defstruct multiple -value-bind t 306syn keyword lispFunc deftype multiple -value-call tagbody 307syn keyword lispFunc defun multiple -value-list tailp 308syn keyword lispFunc defvar multiple -value-prog1 tan 309syn keyword lispFunc delete multiple -value-seteq tanh 310syn keyword lispFunc delete -duplicates multiple-value-setq tenth 311syn keyword lispFunc delete -file multiple-values-limit terpri 312syn keyword lispFunc delete -if name-char the 313syn keyword lispFunc delete -if-not namestring third 314syn keyword lispFunc delete -package nbutlast throw 315syn keyword lispFunc denominator nconc time 316syn keyword lispFunc deposit -field next-method-p trace 317syn keyword lispFunc describe nil translate -logical-pathname 318syn keyword lispFunc describe -object nintersection translate-pathname 319syn keyword lispFunc destructuring -bind ninth tree-equal 320syn keyword lispFunc digit -char no-applicable-method truename 321syn keyword lispFunc digit -char-p no-next-method truncase 322syn keyword lispFunc directory not truncate 323syn keyword lispFunc directory -namestring notany two-way-stream 324syn keyword lispFunc disassemble notevery two -way-stream-input-stream 325syn keyword lispFunc division -by-zero notinline two-way-stream-output-stream 326syn keyword lispFunc do nreconc type 327syn keyword lispFunc do * nreverse typecase 328syn keyword lispFunc do -all-symbols nset-difference type-error 329syn keyword lispFunc documentation nset -exclusive-or type-error-datum 330syn keyword lispFunc do -exeternal-symbols nstring type-error-expected-type 331syn keyword lispFunc do -external-symbols nstring-capitalize type-of 332syn keyword lispFunc dolist nstring -downcase typep 333syn keyword lispFunc do -symbols nstring-upcase unbound-slot 334syn keyword lispFunc dotimes nsublis unbound -slot-instance 335syn keyword lispFunc double -float nsubst unbound-variable 336syn keyword lispFunc double -float-epsilon nsubst-if undefined-function 337syn keyword lispFunc double -float-negative-epsilon nsubst-if-not unexport 338syn keyword lispFunc dpb nsubstitute unintern 339syn keyword lispFunc dribble nsubstitute -if union 340syn keyword lispFunc dynamic -extent nsubstitute-if-not unless 341syn keyword lispFunc ecase nth unread 342syn keyword lispFunc echo -stream nthcdr unread-char 343syn keyword lispFunc echo -stream-input-stream nth-value unsigned-byte 344syn keyword lispFunc echo -stream-output-stream null untrace 345syn keyword lispFunc ed number unuse -package 346syn keyword lispFunc eighth numberp unwind -protect 347syn keyword lispFunc elt numerator update -instance-for-different-class 348syn keyword lispFunc encode -universal-time nunion update-instance-for-redefined-class 349syn keyword lispFunc end -of-file oddp upgraded-array-element-type 350syn keyword lispFunc endp open upgraded -complex-part-type 351syn keyword lispFunc enough -namestring open-stream-p upper-case-p 352syn keyword lispFunc ensure -directories-exist optimize use-package 353syn keyword lispFunc ensure -generic-function or user 354syn keyword lispFunc eq otherwise user -homedir-pathname 355syn keyword lispFunc eql output -stream-p use-value 356syn keyword lispFunc equal package values 357syn keyword lispFunc equalp package -error values-list 358syn keyword lispFunc error package -error-package variable 359syn keyword lispFunc etypecase package -name vector 360syn keyword lispFunc eval package -nicknames vectorp 361syn keyword lispFunc evalhook packagep vector -pop 362syn keyword lispFunc eval -when package-shadowing-symbols vector-push 363syn keyword lispFunc evenp package -used-by-list vector-push-extend 364syn keyword lispFunc every package -use-list warn 365syn keyword lispFunc exp pairlis warning 366syn keyword lispFunc export parse -error when 367syn keyword lispFunc expt parse -integer wild-pathname-p 368syn keyword lispFunc extended -char parse-namestring with-accessors 369syn keyword lispFunc fboundp pathname with -compilation-unit 370syn keyword lispFunc fceiling pathname -device with-condition-restarts 371syn keyword lispFunc fdefinition pathname -directory with-hash-table-iterator 372syn keyword lispFunc ffloor pathname -host with-input-from-string 373syn keyword lispFunc fifth pathname -match-p with-open-file 374syn keyword lispFunc file -author pathname-name with-open-stream 375syn keyword lispFunc file -error pathnamep with-output-to-string 376syn keyword lispFunc file -error-pathname pathname-type with-package-iterator 377syn keyword lispFunc file -length pathname-version with-simple-restart 378syn keyword lispFunc file -namestring peek-char with-slots 379syn keyword lispFunc file -position phase with-standard-io-syntax 380syn keyword lispFunc file -stream pi write 381syn keyword lispFunc file -string-length plusp write-byte 382syn keyword lispFunc file -write-date pop write-char 383syn keyword lispFunc fill position write -line 384syn keyword lispFunc fill -pointer position-if write-sequence 385syn keyword lispFunc find position -if-not write-string 386syn keyword lispFunc find -all-symbols pprint write-to-string 387syn keyword lispFunc find -class pprint-dispatch yes-or-no-p 388syn keyword lispFunc find -if pprint-exit-if-list-exhausted y-or-n-p 389syn keyword lispFunc find -if-not pprint-fill zerop 390 391syn match lispFunc "\<c [ ad ] \+r\> " 392if exists ( "g:lispsyntax_clisp" ) 393" CLISP FFI: 394syn match lispFunc "\<\(ffi:\)\?with-c-\(place\|var\)\> " 395syn match lispFunc "\<\(ffi:\)\?with-foreign-\(object\|string\)\> " 396syn match lispFunc "\<\(ffi:\)\?default-foreign-\(language\|library\)\> " 397syn match lispFunc "\<\( [ us ] _\?\)\?\(element\|deref\|cast\|slot\|validp\)\> " 398syn match lispFunc "\<\(ffi:\)\?set-foreign-pointer\> " 399syn match lispFunc "\<\(ffi:\)\?allocate-\(deep\|shallow\)\> " 400syn match lispFunc "\<\(ffi:\)\?c-lines\> " 401syn match lispFunc "\<\(ffi:\)\?foreign-\(value\|free\|variable\|function\|object\)\> " 402syn match lispFunc "\<\(ffi:\)\?foreign-address\(-null\|unsigned\)\?\> " 403syn match lispFunc "\<\(ffi:\)\?undigned-foreign-address\> " 404syn match lispFunc "\<\(ffi:\)\?c-var-\(address\|object\)\> " 405syn match lispFunc "\<\(ffi:\)\?typeof\> " 406syn match lispFunc "\<\(ffi:\)\?\(bit\)\?sizeof\> " 407" CLISP Macros, functions et al: 408syn match lispFunc "\<\(ext:\)\?with-collect\> " 409syn match lispFunc "\<\(ext:\)\?letf\*\?\> " 410syn match lispFunc "\<\(ext:\)\?finalize\>\> " 411syn match lispFunc "\<\(ext:\)\?memoized\> " 412syn match lispFunc "\<\(ext:\)\?getenv\> " 413syn match lispFunc "\<\(ext:\)\?convert-string-\(to\|from\)-bytes\> " 414syn match lispFunc "\<\(ext:\)\?ethe\> " 415syn match lispFunc "\<\(ext:\)\?with-gensyms\> " 416syn match lispFunc "\<\(ext:\)\?open-http\> " 417syn match lispFunc "\<\(ext:\)\?string-concat\> " 418syn match lispFunc "\<\(ext:\)\?with-http-\(in\|out\)put\> " 419syn match lispFunc "\<\(ext:\)\?with-html-output\> " 420syn match lispFunc "\<\(ext:\)\?expand-form\> " 421syn match lispFunc "\<\(ext:\)\?\(without-\)\?package-lock\> " 422syn match lispFunc "\<\(ext:\)\?re-export\> " 423syn match lispFunc "\<\(ext:\)\?saveinitmem\> " 424syn match lispFunc "\<\(ext:\)\?\(read\|write\)-\(integer\|float\)\> " 425syn match lispFunc "\<\(ext:\)\?\(read\|write\)-\(char\|byte\)-sequence\> " 426syn match lispFunc "\<\(custom:\)\?\*system-package-list\*\> " 427syn match lispFunc "\<\(custom:\)\?\*ansi\*\> " 428endif 429 430" --------------------------------------------------------------------- 431" Lisp Keywords (modifiers): {{{1 432syn keywordlispKey :abort :from-end :overwrite 433syn keywordlispKey :adjustable :gensym :predicate 434syn keywordlispKey :append :host :preserve-whitespace 435syn keywordlispKey :array :if-does-not-exist :pretty 436syn keywordlispKey :base :if-exists :print 437syn keywordlispKey :case :include :print-function 438syn keywordlispKey :circle :index :probe 439syn keywordlispKey :conc-name :inherited :radix 440syn keywordlispKey :constructor :initial-contents :read-only 441syn keywordlispKey :copier :initial-element :rehash-size 442syn keywordlispKey :count :initial-offset :rehash-threshold 443syn keywordlispKey :create :initial-value :rename 444syn keywordlispKey :default :input :rename-and-delete 445syn keywordlispKey :defaults :internal :size 446syn keywordlispKey :device :io :start 447syn keywordlispKey :direction :junk-allowed :start1 448syn keywordlispKey :directory :key :start2 449syn keywordlispKey :displaced-index-offset :length :stream 450syn keywordlispKey :displaced-to :level :supersede 451syn keywordlispKey :element-type :name :test 452syn keywordlispKey :end :named :test-not 453syn keywordlispKey :end1 :new-version :type 454syn keywordlispKey :end2 :nicknames :use 455syn keywordlispKey :error :output :verbose 456syn keywordlispKey :escape :output-file :version 457syn keywordlispKey :external 458" defpackage arguments 459syn keywordlispKey :documentation :shadowing-import-from :modern :export 460syn keywordlispKey :case-sensitive :case-inverted :shadow :import-from :intern 461" lambda list keywords 462syn keywordlispKey &allow-other-keys &aux &body 463syn keywordlispKey &environment &key &optional &rest &whole 464" make-array argument 465syn keywordlispKey :fill-pointer 466" readtable-case values 467syn keywordlispKey :upcase :downcase :preserve :invert 468" eval-when situations 469syn keywordlispKey :load-toplevel :compile-toplevel :execute 470" ANSI Extended LOOP: 471syn keywordlispKey :while :until :for :do :if :then :else :when :unless :in 472syn keywordlispKey :across :finally :collect :nconc :maximize :minimize :sum 473syn keywordlispKey :and :with :initially :append :into :count :end :repeat 474syn keywordlispKey :always :never :thereis :from :to :upto :downto :below 475syn keywordlispKey :above :by :on :being :each :the :hash-key :hash-keys 476syn keywordlispKey :hash-value :hash-values :using :of-type :upfrom :downfrom 477if exists ( "g:lispsyntax_clisp" ) 478" CLISP FFI: 479syn keywordlispKey :arguments :return-type :library :full :malloc-free 480syn keywordlispKey :none :alloca :in :out :in-out :stdc-stdcall :stdc :c 481syn keywordlispKey :language :built-in :typedef :external 482syn keywordlispKey :fini :init-once :init-always 483endif 484 485" --------------------------------------------------------------------- 486" Standard Lisp Variables: {{{1 487syn keywordlispVar *applyhook* *load-pathname* *print-pprint-dispatch* 488syn keywordlispVar *break-on-signals* *load-print* *print-pprint-dispatch* 489syn keywordlispVar *break-on-signals* *load-truename* *print-pretty* 490syn keywordlispVar *break-on-warnings* *load-verbose* *print-radix* 491syn keywordlispVar *compile-file-pathname* *macroexpand-hook* *print-readably* 492syn keywordlispVar *compile-file-pathname* *modules* *print-right-margin* 493syn keywordlispVar *compile-file-truename* *package* *print-right-margin* 494syn keywordlispVar *compile-file-truename* *print-array* *query-io* 495syn keywordlispVar *compile-print* *print-base* *random-state* 496syn keywordlispVar *compile-verbose* *print-case* *read-base* 497syn keywordlispVar *compile-verbose* *print-circle* *read-default-float-format* 498syn keywordlispVar *debug-io* *print-escape* *read-eval * 499syn keywordlispVar *debugger-hook* *print-gensym* *read-suppress* 500syn keywordlispVar *default-pathname-defaults* *print-length* *readtable* 501syn keywordlispVar *error-output* *print-level* *standard-input* 502syn keywordlispVar *evalhook* *print-lines* *standard-output* 503syn keywordlispVar *features* *print-miser-width* *terminal-io* 504syn keywordlispVar *gensym-counter* *print-miser-width* *trace-output* 505 506" --------------------------------------------------------------------- 507" Strings: {{{1 508syn region lispString start = +" +skip = +\\\\\|\\" +end = +" +contains = @Spell 509if exists ( "g:lisp_instring" ) 510syn region lispInString keepend matchgroup = Delimiter start = +"( +rs= s+1skip = +|.\{-}| +matchgroup = Delimiter end = +)" +contains = @lispBaseListCluster , lispInStringString 511syn region lispInStringString start = +\\" +skip = +\\\\ +end = +\\" +contained 512endif 513 514" --------------------------------------------------------------------- 515" Shared with Xlisp, Declarations, Macros, Functions: {{{1 516syn keyword lispDecl defmacro do -all-symbols labels 517syn keyword lispDecl defsetf do -external-symbols let 518syn keyword lispDecl deftype do -symbols locally 519syn keyword lispDecl defun dotimes macrolet 520syn keyword lispDecl do * flet multiple-value-bind 521if exists ( "g:lispsyntax_clisp" ) 522" CLISP FFI: 523syn match lispDecl "\<\(ffi:\)\?def-c-\(var\|const\|enum\|type\|struct\)\> " 524syn match lispDecl "\<\(ffi:\)\?def-call-\(out\|in\)\> " 525syn match lispDecl "\<\(ffi:\)\?c-\(function\|struct\|pointer\|string\)\> " 526syn match lispDecl "\<\(ffi:\)\?c-ptr\(-null\)\?\> " 527syn match lispDecl "\<\(ffi:\)\?c-array\(-ptr\|-max\)\?\> " 528syn match lispDecl "\<\(ffi:\)\? [ us ] \?\(char\|short\|int\|long\)\> " 529syn match lispDecl "\<\(win32:\|w32\)\?d\?word\> " 530syn match lispDecl "\<\( [ us ] _\?\)\?int\(8\|16\|32\|64\)\(_t\)\?\> " 531syn keyword lispDecl size_t off_t time_t handle 532endif 533 534" --------------------------------------------------------------------- 535" Numbers: supporting integers and floating point numbers {{{1 536syn match lispNumber "-\=\(\.\d\+\|\d\+\(\.\d * \)\=\)\( [ dDeEfFlL ][ -+ ] \=\d\+\)\= " 537syn match lispNumber "-\=\(\d\+/\d\+\) " 538 539syn match lispEscapeSpecial "\*\w [ a-z_0-9- ] * \* " 540syn match lispEscapeSpecial !#| [ ^()'`,"; \t ] \+|# ! 541syn match lispEscapeSpecial !#x\x\+ ! 542syn match lispEscapeSpecial !#o\o\+ ! 543syn match lispEscapeSpecial !#b [ 01 ] \+ ! 544syn match lispEscapeSpecial !#\\ [ -}\~ ] ! 545syn match lispEscapeSpecial !# [ ': ][ ^()'`,"; \t ] \+ ! 546syn match lispEscapeSpecial !#( [ ^()'`,"; \t ] \+) ! 547syn match lispEscapeSpecial !#\\\%(Space\|Newline\|Tab\|Page\|Rubout\|Linefeed\|Return\|Backspace\) ! 548syn match lispEscapeSpecial "\<+ [ a-zA-Z_ ][ a-zA-Z_0-9- ] * +\> " 549 550syn match lispConcat "\s\.\s " 551syn match lispParenError ") " 552 553" --------------------------------------------------------------------- 554" Comments: {{{1 555syn cluster lispCommentGroup contains = lispTodo , @Spell 556syn match lispComment ";. * $ "contains = @lispCommentGroup 557syn region lispCommentRegion start = "#| "end = "|# "contains = lispCommentRegion , @lispCommentGroup 558syn region lispComment start = "#+nil "end = "\ze) "contains = @lispCommentGroup 559syn match lispComment '^\s * #+nil. * $ 'contains = @lispCommentGroup 560syn keyword lispTodo contained combak combak : todo todo: 561 562" --------------------------------------------------------------------- 563" Synchronization: {{{1 564syn sync lines= 100 565 566" --------------------------------------------------------------------- 567" Define Highlighting: {{{1 568if ! exists ( "skip_lisp_syntax_inits" ) 569 570hi def link lispCommentRegion lispComment 571hi def link lispAtomNmbr lispNumber 572hi def link lispAtomMark lispMark 573hi def link lispInStringString lispString 574 575hi def link lispAtom Identifier 576hi def link lispAtomBarSymbol Special 577hi def link lispBarSymbol Special 578hi def link lispComment Comment 579hi def link lispConcat Statement 580hi def link lispDecl Statement 581hi def link lispFunc Statement 582hi def link lispKey Type 583hi def link lispMark Delimiter 584hi def link lispNumber Number 585hi def link lispParenError Error 586hi def link lispEscapeSpecial Type 587hi def link lispString String 588hi def link lispTodo Todo 589hi def link lispVar Statement 590 591if exists ( "g:lisp_rainbow" ) && g: lisp_rainbow != 0 592if & bg == "dark" 593hi def hlLevel0 ctermfg = red guifg= red1 594hi def hlLevel1 ctermfg = yellow guifg= orange1 595hi def hlLevel2 ctermfg = green guifg= yellow1 596hi def hlLevel3 ctermfg = cyan guifg = greenyellow 597hi def hlLevel4 ctermfg = magenta guifg= green1 598hi def hlLevel5 ctermfg = red guifg= springgreen1 599hi def hlLevel6 ctermfg = yellow guifg= cyan1 600hi def hlLevel7 ctermfg = green guifg= slateblue1 601hi def hlLevel8 ctermfg = cyan guifg= magenta1 602hi def hlLevel9 ctermfg = magenta guifg= purple1 603else 604hi def hlLevel0 ctermfg = red guifg= red3 605hi def hlLevel1 ctermfg = darkyellow guifg= orangered3 606hi def hlLevel2 ctermfg = darkgreen guifg= orange2 607hi def hlLevel3 ctermfg = blue guifg= yellow3 608hi def hlLevel4 ctermfg = darkmagenta guifg= olivedrab4 609hi def hlLevel5 ctermfg = red guifg= green4 610hi def hlLevel6 ctermfg = darkyellow guifg= paleturquoise3 611hi def hlLevel7 ctermfg = darkgreen guifg= deepskyblue4 612hi def hlLevel8 ctermfg = blue guifg = darkslateblue 613hi def hlLevel9 ctermfg = darkmagenta guifg = darkviolet 614endif 615else 616hi def link lispParen Delimiter 617endif 618 619endif 620 621let b: current_syntax = "lisp" 622 623" --------------------------------------------------------------------- 624" vim: ts=8 nowrap fdm=marker