diff options
| author | 2025-03-09 21:40:37 +0200 | |
|---|---|---|
| committer | 2025-03-09 22:58:10 +0200 | |
| commit | 3a5273f5b3f206c641412439dc90c7f3bb015ed1 (patch) | |
| tree | 83abb139b7c2f6c65eedae72e3dbc1fb7fa88a23 | |
| parent | nxml-mode: Add .plist as a recognised extension (diff) | |
| download | emacs.d-3a5273f5b3f206c641412439dc90c7f3bb015ed1.tar.gz emacs.d-3a5273f5b3f206c641412439dc90c7f3bb015ed1.tar.xz emacs.d-3a5273f5b3f206c641412439dc90c7f3bb015ed1.zip | |
prog-mode: Remove prettification
While it's cool, it fucked with indentation sometimes and sometimes made me confused.
| -rw-r--r-- | init.el | 44 |
1 files changed, 0 insertions, 44 deletions
| @@ -573,50 +573,6 @@ | |||
| 573 | :repo "Kaali/pico8-mode") | 573 | :repo "Kaali/pico8-mode") |
| 574 | :mode "\\.p8\\'") | 574 | :mode "\\.p8\\'") |
| 575 | 575 | ||
| 576 | (use-package prog-mode | ||
| 577 | :straight '(prog-mode :type built-in) | ||
| 578 | :preface | ||
| 579 | (defun prepend-prettify (items) | ||
| 580 | (setq prettify-symbols-alist (append items prettify-symbols-alist)) | ||
| 581 | (prettify-symbols-mode -1) | ||
| 582 | (prettify-symbols-mode +1)) | ||
| 583 | (defun prettify-prog-mode () | ||
| 584 | (prepend-prettify '((">=" . ?≥) | ||
| 585 | ("<=" . ?≤)))) | ||
| 586 | (defun prettify-cc-modes () | ||
| 587 | (prepend-prettify '(("->" . ?→) | ||
| 588 | ("<<" . ?≪) | ||
| 589 | (">>" . ?≫) | ||
| 590 | ("==" . (?= (tc . bc) ??)) | ||
| 591 | ("!=" . (?≠ (tc . bc) ??)) | ||
| 592 | ("^" . ?⊕) | ||
| 593 | ("&&" . ?∧) | ||
| 594 | ("||" . ?∨) | ||
| 595 | ("<<=" . (?≪ (cr . cl) ?=)) | ||
| 596 | (">>=" . (?≫ (cr . cl) ?=)) | ||
| 597 | ("&=" . (?∩ (cr . cl) ?=)) | ||
| 598 | ("|=" . (?∪ (cr . cl) ?=)) | ||
| 599 | ("^=" . (?⊕ (cr . cl) ?=)) | ||
| 600 | ("bool" . ?𝔹) | ||
| 601 | ("_Bool" . ?𝔹) | ||
| 602 | ("int" . ?ℤ) | ||
| 603 | ("float" . ?ℚ) | ||
| 604 | ("true" . ?𝕋) | ||
| 605 | ("_True" . ?𝕋) | ||
| 606 | ("false" . ?𝔽) | ||
| 607 | ("_False" . ?𝔽)))) | ||
| 608 | (defun prettify-lisp-modes () | ||
| 609 | (prepend-prettify '(("lambda" . ?λ) | ||
| 610 | ("lambda*" . (?λ (cr . Bc) ?⋆)) | ||
| 611 | ("->" . ?→) | ||
| 612 | ("=>" . ?⇒)))) | ||
| 613 | :hook (c-mode-common . prettify-cc-modes) | ||
| 614 | :hook (c-ts-base-mode . prettify-cc-modes) | ||
| 615 | :hook (emacs-lisp-mode . prettify-lisp-modes) | ||
| 616 | :hook (lisp-mode . prettify-lisp-modes) | ||
| 617 | :hook (prog-mode . prettify-prog-mode) | ||
| 618 | :hook (scheme-mode . prettify-lisp-modes)) | ||
| 619 | |||
| 620 | ;; use-package project | 576 | ;; use-package project |
| 621 | (require 'arkta-project) | 577 | (require 'arkta-project) |
| 622 | 578 | ||