Created
June 21, 2018 12:00
-
-
Save jmayaalv/c3ddcbec479d492284b5e90bd24b8f7e to your computer and use it in GitHub Desktop.
Avoid problems with Fira on mac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(when (window-system) | |
(set-default-font "Fira Code")) | |
(let ((alist '((33 . ".\\(?:\\(?:==\\|!!\\)\\|[!=]\\)") | |
(35 . ".\\(?:###\\|##\\|_(\\|[#(?[_{]\\)") | |
(36 . ".\\(?:>\\)") | |
(37 . ".\\(?:\\(?:%%\\)\\|%\\)") | |
(38 . ".\\(?:\\(?:&&\\)\\|&\\)") | |
(42 . ".\\(?:\\(?:\\*\\*/\\)\\|\\(?:\\*[*/]\\)\\|[*/>]\\)") | |
(43 . ".\\(?:\\(?:\\+\\+\\)\\|[+>]\\)") | |
(45 . ".\\(?:\\(?:-[>-]\\|<<\\|>>\\)\\|[<>}~-]\\)") | |
;; (46 . ".\\(?:\\(?:\\.[.<]\\)\\|[.=-]\\)") | |
;; (47 . ".\\(?:\\(?:\\*\\*\\|//\\|==\\)\\|[*/=>]\\)") | |
(48 . ".\\(?:x[a-zA-Z]\\)") | |
(58 . ".\\(?:::\\|[:=]\\)") | |
(59 . ".\\(?:;;\\|;\\)") | |
(60 . ".\\(?:\\(?:!--\\)\\|\\(?:~~\\|->\\|\\$>\\|\\*>\\|\\+>\\|--\\|<[<=-]\\|=[<=>]\\||>\\)\\|[*$+~/<=>|-]\\)") | |
(61 . ".\\(?:\\(?:/=\\|:=\\|<<\\|=[=>]\\|>>\\)\\|[<=>~]\\)") | |
(62 . ".\\(?:\\(?:=>\\|>[=>-]\\)\\|[=>-]\\)") | |
(63 . ".\\(?:\\(\\?\\?\\)\\|[:=?]\\)") | |
(91 . ".\\(?:]\\)") | |
(92 . ".\\(?:\\(?:\\\\\\\\\\)\\|\\\\\\)") | |
(94 . ".\\(?:=\\)") | |
(119 . ".\\(?:ww\\)") | |
(123 . ".\\(?:-\\)") | |
(124 . ".\\(?:\\(?:|[=|]\\)\\|[=>|]\\)") | |
(126 . ".\\(?:~>\\|~~\\|[>=@~-]\\)")))) | |
(dolist (char-regexp alist) | |
(set-char-table-range composition-function-table (car char-regexp) | |
`([,(cdr char-regexp) 0 font-shape-gstring])))) | |
(add-hook 'cider-repl-mode-hook | |
(lambda () | |
(setq auto-composition-mode nil))) | |
(add-hook 'org-mode-hook | |
(lambda () | |
(setq auto-composition-mode nil))) | |
(add-hook 'helm-major-mode-hook | |
(lambda () | |
(setq auto-composition-mode nil))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment