Doom-emacs: [QUESTION] pretty-code

Created on 21 Sep 2019  ·  2Comments  ·  Source: hlissner/doom-emacs

I'am sorry, how disable prettify-symbols-mode by default (but not remove package). And how to redefine. prettify-symbols-alist - I tried to create a function for js2-mode-hook, but my values ​​are not used and (describe-variable 'prettify-symbols-alist) - prints not my values of local buffer.

(defun setup-js2-prettify-symbols ()
    "Set prettify symbols alist."
    (interactive)
    (setq prettify-symbols-alist '(("lambda" . "λ")
                                  ("->" . "→")
                                  ("!=" . "≠")
                                  ("<=" . "≤")
                                  (">=" . "≥")
                                  ("=<<" . "=≪")
                                  ("!" . "¬")
                                  ("null" . "∅")
                                  ("function" . "ƒ")
                                  (">>=" . "≫=")))
      ;; (delete '("false" . "𝔽") prettify-symbols-alist)
      ;; (delete '("true" . "𝕋") prettify-symbols-alist)
      (prettify-symbols-mode -1)
  )

(add-hook! 'js2-mode-hook 'setup-js2-prettify-symbols)
:ui ligatures question resolved

All 2 comments

If you don't need the :ui pretty-code module, you may disable it. prettify-symbols-mode is built into Emacs, it won't be uninstalled.

Otherwise, you can disable what the module does with:

(setq +pretty-code-enabled-modes nil)

;; or

(remove-hook 'after-change-major-mode-hook #'+pretty-code-init-pretty-symbols-h)

Thank you, you helped me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

randomizedthinking picture randomizedthinking  ·  3Comments

laishulu picture laishulu  ·  3Comments

governorgoat picture governorgoat  ·  3Comments

gilbertw1 picture gilbertw1  ·  3Comments

oyarsa picture oyarsa  ·  3Comments