Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Lisp is not colorized. #140

Open
irigone opened this issue Dec 10, 2020 · 0 comments
Open

[bug] Lisp is not colorized. #140

irigone opened this issue Dec 10, 2020 · 0 comments

Comments

@irigone
Copy link

irigone commented Dec 10, 2020

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

  1. Quoted elements ('element).
  2. Sharp quoted elements (#'element).
  3. Element with a backtick (`element).
  4. Element with a comma (,element). Not sure what this does.
    Here's how it all looks like in one place.
    screenshot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant