fabrizioschiavi / pragmatapro

PragmataPro font is designed to help pros to work better
https://www.fsd.it/shop/fonts/pragmatapro/
1.41k stars 40 forks source link

Ligatures for lisp comment delimiters #292

Open stevemolitor opened 5 months ago

stevemolitor commented 5 months ago

Lisp languages use ;; to start comments:

;; this is a comment for my function
(defun my-function ())

It'd be nice if there were a ligature for ;;, to group the characters more closely together, similar to the // ligature. This would benefit languages like Emacs Lisp, Clojure, Comment Lisp, Scheme, Racket, etc.

Emacs often uses multiple ; characters as a section header in code:

;;; this is a section header

;; function 1 comment
(defun f1())

;;;; this is a nested section header
;; function 2 comment
(defun f2()

So it'd also be nice if sequences of ; characters like ;;;, ;;;;, ;;;;; were also ligatures.

fabrizioschiavi commented 5 months ago

It’s a good suggestion Steve, thanks! My question is: How can we design this ligature to be both captivating and appealing?

stevemolitor commented 5 months ago

Hmm, I guess I was thinking it would group the ; characters more closely together, similar to the ... or || ligatures.

Here's how it looks in Iosevak, with ligatures off and the on:

Note that with ligatures on it groups the ; characters more closely together. It's subtle but signals that e.g. ;; constitutes a single semantic unit (comment character).

(Also note that character alignment does not shift around when ligatures are turned on.)