1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
|
" Vim syntax file
" Language: Lisp
" Maintainer: This runtime file is looking for a new maintainer.
" Former Maintainer: Charles E. Campbell
" Last Change: Nov 10, 2021
" 2024 Feb 19 by Vim Project (announce adoption)
" Version: 31
" Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_LISP
"
" Thanks to F Xavier Noria for a list of 978 Common Lisp symbols taken from HyperSpec
" Clisp additions courtesy of http://clisp.cvs.sourceforge.net/*checkout*/clisp/clisp/emacs/lisp.vim
" ---------------------------------------------------------------------
" Load Once: {{{1
if exists("b:current_syntax")
finish
endif
if exists("g:lisp_isk")
exe "setl isk=".g:lisp_isk
elseif (v:version == 704 && has("patch-7.4.1142")) || v:version > 704
syn iskeyword 38,42,43,45,47-58,60-62,64-90,97-122,_
else
setl isk=38,42,43,45,47-58,60-62,64-90,97-122,_
endif
if exists("g:lispsyntax_ignorecase") || exists("g:lispsyntax_clisp")
set ignorecase
endif
" ---------------------------------------------------------------------
" Clusters: {{{1
syn cluster lispAtomCluster contains=lispAtomBarSymbol,lispAtomList,lispAtomNmbr0,lispComment,lispDecl,lispFunc,lispLeadWhite
syn cluster lispBaseListCluster contains=lispAtom,lispAtomBarSymbol,lispAtomMark,lispBQList,lispBarSymbol,lispComment,lispConcat,lispDecl,lispFunc,lispKey,lispList,lispNumber,lispEscapeSpecial,lispSymbol,lispVar,lispLeadWhite
if exists("g:lisp_instring")
syn cluster lispListCluster contains=@lispBaseListCluster,lispString,lispInString,lispInStringString
else
syn cluster lispListCluster contains=@lispBaseListCluster,lispString
endif
syn case ignore
" ---------------------------------------------------------------------
" Lists: {{{1
syn match lispSymbol contained ![^()'`,"; \t]\+!
syn match lispBarSymbol contained !|..\{-}|!
if exists("g:lisp_rainbow") && g:lisp_rainbow != 0
syn region lispParen0 matchgroup=hlLevel0 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen1
syn region lispParen1 contained matchgroup=hlLevel1 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen2
syn region lispParen2 contained matchgroup=hlLevel2 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen3
syn region lispParen3 contained matchgroup=hlLevel3 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen4
syn region lispParen4 contained matchgroup=hlLevel4 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen5
syn region lispParen5 contained matchgroup=hlLevel5 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen6
syn region lispParen6 contained matchgroup=hlLevel6 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen7
syn region lispParen7 contained matchgroup=hlLevel7 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen8
syn region lispParen8 contained matchgroup=hlLevel8 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen9
syn region lispParen9 contained matchgroup=hlLevel9 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen0
else
syn region lispList matchgroup=lispParen start="(" skip="|.\{-}|" matchgroup=lispParen end=")" contains=@lispListCluster
syn region lispBQList matchgroup=PreProc start="`(" skip="|.\{-}|" matchgroup=PreProc end=")" contains=@lispListCluster
endif
" ---------------------------------------------------------------------
" Atoms: {{{1
syn match lispAtomMark "'"
syn match lispAtom "'("me=e-1 contains=lispAtomMark nextgroup=lispAtomList
syn match lispAtom "'[^ \t()]\+" contains=lispAtomMark
syn match lispAtomBarSymbol !'|..\{-}|! contains=lispAtomMark
syn region lispAtom start=+'"+ skip=+\\"+ end=+"+
syn region lispAtomList contained matchgroup=Special start="(" skip="|.\{-}|" matchgroup=Special end=")" contains=@lispAtomCluster,lispString,lispEscapeSpecial
syn match lispAtomNmbr contained "\<\d\+"
syn match lispLeadWhite contained "^\s\+"
" ---------------------------------------------------------------------
" Standard Lisp Functions and Macros: {{{1
syn keyword lispFunc < find-method pprint-indent
syn keyword lispFunc <= find-package pprint-linear
syn keyword lispFunc = find-restart pprint-logical-block
syn keyword lispFunc > find-symbol pprint-newline
syn keyword lispFunc >= finish-output pprint-pop
syn keyword lispFunc - first pprint-tab
syn keyword lispFunc / fixnum pprint-tabular
syn keyword lispFunc /= flet prin1
syn keyword lispFunc // float prin1-to-string
syn keyword lispFunc /// float-digits princ
syn keyword lispFunc * floating-point-inexact princ-to-string
syn keyword lispFunc ** floating-point-invalid-operation print
syn keyword lispFunc *** floating-point-overflow print-not-readable
syn keyword lispFunc + floating-point-underflow print-not-readable-object
syn keyword lispFunc ++ floatp print-object
syn keyword lispFunc +++ float-precision print-unreadable-object
syn keyword lispFunc 1- float-radix probe-file
syn keyword lispFunc 1+ float-sign proclaim
syn keyword lispFunc abort floor prog
syn keyword lispFunc abs fmakunbound prog*
syn keyword lispFunc access force-output prog1
syn keyword lispFunc acons format prog2
syn keyword lispFunc acos formatter progn
syn keyword lispFunc acosh fourth program-error
syn keyword lispFunc add-method fresh-line progv
syn keyword lispFunc adjoin fround provide
syn keyword lispFunc adjustable-array-p ftruncate psetf
syn keyword lispFunc adjust-array ftype psetq
syn keyword lispFunc allocate-instance funcall push
syn keyword lispFunc alpha-char-p function pushnew
syn keyword lispFunc alphanumericp function-keywords putprop
syn keyword lispFunc and function-lambda-expression quote
syn keyword lispFunc append functionp random
syn keyword lispFunc apply gbitp random-state
syn keyword lispFunc applyhook gcd random-state-p
syn keyword lispFunc apropos generic-function rassoc
syn keyword lispFunc apropos-list gensym rassoc-if
syn keyword lispFunc aref gentemp rassoc-if-not
syn keyword lispFunc arithmetic-error get ratio
syn keyword lispFunc arithmetic-error-operands get-decoded-time rational
syn keyword lispFunc arithmetic-error-operation get-dispatch-macro-character rationalize
syn keyword lispFunc array getf rationalp
syn keyword lispFunc array-dimension gethash read
syn keyword lispFunc array-dimension-limit get-internal-real-time read-byte
syn keyword lispFunc array-dimensions get-internal-run-time read-char
syn keyword lispFunc array-displacement get-macro-character read-char-no-hang
syn keyword lispFunc array-element-type get-output-stream-string read-delimited-list
syn keyword lispFunc array-has-fill-pointer-p get-properties reader-error
syn keyword lispFunc array-in-bounds-p get-setf-expansion read-eval-print
syn keyword lispFunc arrayp get-setf-method read-from-string
syn keyword lispFunc array-rank get-universal-time read-line
syn keyword lispFunc array-rank-limit go read-preserving-whitespace
syn keyword lispFunc array-row-major-index graphic-char-p read-sequence
syn keyword lispFunc array-total-size handler-bind readtable
syn keyword lispFunc array-total-size-limit handler-case readtable-case
syn keyword lispFunc ash hash-table readtablep
syn keyword lispFunc asin hash-table-count real
syn keyword lispFunc asinh hash-table-p realp
syn keyword lispFunc assert hash-table-rehash-size realpart
syn keyword lispFunc assoc hash-table-rehash-threshold reduce
syn keyword lispFunc assoc-if hash-table-size reinitialize-instance
syn keyword lispFunc assoc-if-not hash-table-test rem
syn keyword lispFunc atan host-namestring remf
syn keyword lispFunc atanh identity remhash
syn keyword lispFunc atom if remove
syn keyword lispFunc base-char if-exists remove-duplicates
syn keyword lispFunc base-string ignorable remove-if
syn keyword lispFunc bignum ignore remove-if-not
syn keyword lispFunc bit ignore-errors remove-method
syn keyword lispFunc bit-and imagpart remprop
syn keyword lispFunc bit-andc1 import rename-file
syn keyword lispFunc bit-andc2 incf rename-package
syn keyword lispFunc bit-eqv initialize-instance replace
syn keyword lispFunc bit-ior inline require
syn keyword lispFunc bit-nand in-package rest
syn keyword lispFunc bit-nor in-package restart
syn keyword lispFunc bit-not input-stream-p restart-bind
syn keyword lispFunc bit-orc1 inspect restart-case
syn keyword lispFunc bit-orc2 int-char restart-name
syn keyword lispFunc bit-vector integer return
syn keyword lispFunc bit-vector-p integer-decode-float return-from
syn keyword lispFunc bit-xor integer-length revappend
syn keyword lispFunc block integerp reverse
syn keyword lispFunc boole interactive-stream-p room
syn keyword lispFunc boole-1 intern rotatef
syn keyword lispFunc boole-2 internal-time-units-per-second round
syn keyword lispFunc boolean intersection row-major-aref
syn keyword lispFunc boole-and invalid-method-error rplaca
syn keyword lispFunc boole-andc1 invoke-debugger rplacd
syn keyword lispFunc boole-andc2 invoke-restart safety
syn keyword lispFunc boole-c1 invoke-restart-interactively satisfies
syn keyword lispFunc boole-c2 isqrt sbit
syn keyword lispFunc boole-clr keyword scale-float
syn keyword lispFunc boole-eqv keywordp schar
syn keyword lispFunc boole-ior labels search
syn keyword lispFunc boole-nand lambda second
syn keyword lispFunc boole-nor lambda-list-keywords sequence
syn keyword lispFunc boole-orc1 lambda-parameters-limit serious-condition
syn keyword lispFunc boole-orc2 last set
syn keyword lispFunc boole-set lcm set-char-bit
syn keyword lispFunc boole-xor ldb set-difference
syn keyword lispFunc both-case-p ldb-test set-dispatch-macro-character
syn keyword lispFunc boundp ldiff set-exclusive-or
syn keyword lispFunc break least-negative-double-float setf
syn keyword lispFunc broadcast-stream least-negative-long-float set-macro-character
syn keyword lispFunc broadcast-stream-streams least-negative-normalized-double-float set-pprint-dispatch
syn keyword lispFunc built-in-class least-negative-normalized-long-float setq
syn keyword lispFunc butlast least-negative-normalized-short-float set-syntax-from-char
syn keyword lispFunc byte least-negative-normalized-single-float seventh
syn keyword lispFunc byte-position least-negative-short-float shadow
syn keyword lispFunc byte-size least-negative-single-float shadowing-import
syn keyword lispFunc call-arguments-limit least-positive-double-float shared-initialize
syn keyword lispFunc call-method least-positive-long-float shiftf
syn keyword lispFunc call-next-method least-positive-normalized-double-float short-float
syn keyword lispFunc capitalize least-positive-normalized-long-float short-float-epsilon
syn keyword lispFunc car least-positive-normalized-short-float short-float-negative-epsilon
syn keyword lispFunc case least-positive-normalized-single-float short-site-name
syn keyword lispFunc catch least-positive-short-float signal
syn keyword lispFunc ccase least-positive-single-float signed-byte
syn keyword lispFunc cdr length signum
syn keyword lispFunc ceiling let simple-array
syn keyword lispFunc cell-error let* simple-base-string
syn keyword lispFunc cell-error-name lisp simple-bit-vector
syn keyword lispFunc cerror lisp-implementation-type simple-bit-vector-p
syn keyword lispFunc change-class lisp-implementation-version simple-condition
syn keyword lispFunc char list simple-condition-format-arguments
syn keyword lispFunc char< list* simple-condition-format-control
syn keyword lispFunc char<= list-all-packages simple-error
syn keyword lispFunc char= listen simple-string
syn keyword lispFunc char> list-length simple-string-p
syn keyword lispFunc char>= listp simple-type-error
syn keyword lispFunc char/= load simple-vector
syn keyword lispFunc character load-logical-pathname-translations simple-vector-p
syn keyword lispFunc characterp load-time-value simple-warning
syn keyword lispFunc char-bit locally sin
syn keyword lispFunc char-bits log single-flaot-epsilon
syn keyword lispFunc char-bits-limit logand single-float
syn
|