PrismJS / prism

Lightweight, robust, elegant syntax highlighting.
https://prismjs.com
MIT License
12.33k stars 1.29k forks source link

Common Lisp #3755

Open daninus14 opened 11 months ago

daninus14 commented 11 months ago

Language ANSI Common Lisp is a language based on the LISP family Wikipedia

Additional resources All Common Lisp Symbols from the Specification Language Specification. Another copy of the Language Specification PDF Specification New Technical Reference (Work In Progress) some website

daninus14 commented 11 months ago

Since this is a Lisp language, it should probably be somewhat straightforward to modify the Scheme or Emacs Lisp parser to make a new one for common-lisp.

The main parsing is probably two things:

  1. Highlighting the common lisp symbols All Common Lisp Symbols from the Specification
  2. Adding highlighting for some of the macros, in particular the loop macro and let that show up all the time and it's useful to have them highlighted. Here are examples:

Thanks!

daninus14 commented 11 months ago

This could be useful: https://github.com/orthecreedence/highlight-lisp

daninus14 commented 11 months ago

The clojure language package already colors a lot of common-lisp things better than the regular lisp package. Maybe just a few small modifications to clojure would get us to common-lisp? Probably replacing line 17 with All Common Lisp Symbols from the Specification is half the work. After that, probably just the few macros is the rest which hopefully is easy since it's just a few.

snunez1 commented 8 months ago

Perhaps in the meantime it would be a good idea to remove Lisp from the list of supported languages.