Tygs / 0bin

Client side encrypted pastebin
https://0bin.net
Do What The F*ck You Want To Public License
1.37k stars 198 forks source link

[bug] Lisp is not colorized. #140

Open irigone opened 3 years ago

irigone commented 3 years ago

For example, this is written in Emacs Lisp. https://0bin.net/paste/rl-fwzGv#GcPdMyG8gJG21iQiMOlptn-Th8G2ieKPgdRhUDG/0KC Lisp syntax is pretty easy: everything inside brackets is called a list, the first element of a list is the function name, everything else is the arguments, separated by spaces. A list can be an element of a list, that's why most Lisp programmers use rainbow delimiters, where every bracket pair is colored differently for readability purposes. Everything in Lisp is done this way, even + - / * are written like (+ num1 num2 num3). Comments are semicolons (the ";" symbol). Now, there are some exceptions to this rule:

  1. Macros. For example,

    (use-package modus-operandi-theme
    :straight t
    :init
    (load-theme 'modus-operandi t))

    use-package is a macro, and :straight and :init are not evaluated. They are called keywords. They exist in all Lisps

  2. Quoted elements ('element).

  3. Sharp quoted elements (#'element).

  4. Element with a backtick (`element).

  5. Element with a comma (,element). Not sure what this does. Here's how it all looks like in one place. screenshot