clojure-emacs / clojure-emacs/clojure-mode
All top-level def forms should have consistent font-lock
- Lingua principale
- Emacs Lisp
- Stelle
- 999
- Fork
- 249
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Some thoughts on syntax highlighting.
```
(def foo 42) ; font-lock-variable-name-face
(defn bar [x] x) ; font-lock-function-name-face
```
I think variable-name-face should be used for foo in `(let [foo 42] ...)`, but not for foo in `(def foo 42)`. Top-level definitions should use the same face, whether its a function or a 'variable'. It seems more logical, since if I want to make both "foo" and "bar" use the same bold and highly visible face (since both are top-level defs), then e.g. in my c code I get local variables and function arguments highlighted with the same face.
I guess the correct hierarchy would be: top-level-definition-face -> (function-face, var-face[1]). It would be nice to have a separate space for def-like keywords as well (so a user could highlight "defn", but not "do" or "let").
[1]: technically defn also creates a var; what's the best short name for a top-level definition that is not a function? Do we actually need/want this distinction at all? I don't really see how it's useful.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia esaminando le regole font-lock esistenti di clojure-mode e il modo in cui assegnano i face a def, defn, ai binding di let e ad altre forme simili a def. Determina se le definizioni di primo livello necessitano di un face condiviso e se le parole chiave simili a def necessitano di una propria categoria di evidenziazione; il lavoro è completato quando il comportamento e la gerarchia dei face sono coerenti in tutti gli esempi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- clojure, emacs-lisp
- Ambito
- developer-experience, tooling
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 25/100