Comment

Comment by antiframe

It's pretty easy. You can opt into any ligature you like across every mode, and then add extra ones for each programming mode or other mode. For example:

  (use-package ligature
    :ensure t
    :config
    ;; Enable specific ligatures globally across all modes:
    (ligature-set-ligatures 't '("==" "===" "!=" "->" "-->" "=>" "=="))
  
    ;; Enable individual ligatures only for specific programming modes:
    (ligature-set-ligatures '(python-mode rust-mode c-mode)
                            '("||" "&&" "::" "->" "=>" "!="))

    ;; Enable ligatures only for HTML / XML:
    (ligature-set-ligatures '(html-mode nxml-mode web-mode)
                            '("<!--" "-->" "</" "/>"))

    ;; Enable global ligature mode
    (global-ligature-mode t))
parent antiframe 11 days ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton