Add :ui pretty-code & set-pretty-symbols! autodef

Along with defaults for C/C++, elm, elisp, js, typescript, web-mode, and
org-mode. Thanks to @ar1a for inspiration.
This commit is contained in:
Henrik Lissner 2018-06-16 19:32:25 +02:00
parent b991af552c
commit ec8ae0bedc
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
9 changed files with 183 additions and 5 deletions

View file

@ -60,6 +60,22 @@ compilation database is present in the project.")
:config
(set-electric! '(c-mode c++-mode objc-mode java-mode) :chars '(?\n ?\}))
(set-pretty-symbols! '(c-mode-hook c++-mode-hook)
;; Functional
;; :def "void "
;; Types
:null "nullptr"
:true "true" :false "false"
:int "int" :float "float"
:str "std::string"
:bool "bool"
;; Flow
:not "!"
:and "&&" :or "||"
:for "for"
:return "return"
:yield "#require")
;;; Better fontification (also see `modern-cpp-font-lock')
(add-hook 'c-mode-common-hook #'rainbow-delimiters-mode)
(add-hook! '(c-mode-hook c++-mode-hook)