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:
parent
b991af552c
commit
ec8ae0bedc
9 changed files with 183 additions and 5 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue