+prettify-symbols config in packages config
This is easier to do, I found another problem with it so I moved the C++ config to one universal one.
This commit is contained in:
@@ -145,6 +145,62 @@ Add CMakeLists.txt to projectile-project-roots.
|
|||||||
(setq projectile-tags-command
|
(setq projectile-tags-command
|
||||||
"ctags -e -R --exclude=dist --exclude=.ccls --exclude=.ccls-cache"))
|
"ctags -e -R --exclude=dist --exclude=.ccls --exclude=.ccls-cache"))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
** Prettify symbols
|
||||||
|
Configuration for the module (pretty-code).
|
||||||
|
*** Setup symbols
|
||||||
|
Some symbols aren't present in the current doom version, or my fonts are
|
||||||
|
screwing up, so I wrote them here. Maybe a bit of a bandage over broken glass,
|
||||||
|
but still at least it's something.
|
||||||
|
#+BEGIN_SRC elisp
|
||||||
|
(setq +pretty-code-symbols '(:name "»"
|
||||||
|
:src_block "»"
|
||||||
|
:src_block_end "«"
|
||||||
|
:quote "“"
|
||||||
|
:quote_end "”"
|
||||||
|
:lambda "λ"
|
||||||
|
:def "ƒ"
|
||||||
|
:composition "∘"
|
||||||
|
:map "↦"
|
||||||
|
:null "∅"
|
||||||
|
:true "𝕋"
|
||||||
|
:false "𝔽"
|
||||||
|
:int "ℤ"
|
||||||
|
:float "ℝ"
|
||||||
|
:str "𝕊"
|
||||||
|
:bool "𝔹"
|
||||||
|
:not "¬"
|
||||||
|
:in "∈"
|
||||||
|
:not-in "∉"
|
||||||
|
:and "∧"
|
||||||
|
:or "∨"
|
||||||
|
:for "∀"
|
||||||
|
:some "∃"
|
||||||
|
:return "⟼"
|
||||||
|
:yield "⟻"
|
||||||
|
:tuple "⨂"
|
||||||
|
:pipe "|"
|
||||||
|
:dot "•"))
|
||||||
|
#+END_SRC
|
||||||
|
*** Pretty symbols
|
||||||
|
Setup pretty symbols specifically for C++. I import the string type via `using
|
||||||
|
std::string` which isn't supported in standard doom. So I add support for it.
|
||||||
|
#+BEGIN_SRC elisp
|
||||||
|
(after! cc-mode
|
||||||
|
(set-pretty-symbols!
|
||||||
|
'(c-mode c++-mode)
|
||||||
|
:return "return"
|
||||||
|
:or "||"
|
||||||
|
:and "&&"
|
||||||
|
:not "!"
|
||||||
|
:bool "bool"
|
||||||
|
:str "string"
|
||||||
|
:str "std::string"
|
||||||
|
:float "float"
|
||||||
|
:int "int"
|
||||||
|
:false "false"
|
||||||
|
:true "true"
|
||||||
|
:null "nullptr"))
|
||||||
|
#+END_SRC
|
||||||
* Language Config
|
* Language Config
|
||||||
Configuration for various languages which I feel can be useful
|
Configuration for various languages which I feel can be useful
|
||||||
** C-style languages
|
** C-style languages
|
||||||
@@ -172,26 +228,6 @@ Emacs doesn't have the full range of styles that I want, so lemme just do it mys
|
|||||||
(label . 0)
|
(label . 0)
|
||||||
(statement-cont . +)))))
|
(statement-cont . +)))))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
*** Pretty symbols
|
|
||||||
Setup pretty symbols specifically for C++. I import the string type via `using
|
|
||||||
std::string` which isn't supported in standard doom. So I add support for it.
|
|
||||||
#+BEGIN_SRC elisp
|
|
||||||
(after! cc-mode
|
|
||||||
(set-pretty-symbols!
|
|
||||||
'(c-mode c++-mode)
|
|
||||||
:return "return"
|
|
||||||
:or "||"
|
|
||||||
:and "&&"
|
|
||||||
:not "!"
|
|
||||||
:bool "bool"
|
|
||||||
:str "string"
|
|
||||||
:str "std::string"
|
|
||||||
:float "float"
|
|
||||||
:int "int"
|
|
||||||
:false "false"
|
|
||||||
:true "true"
|
|
||||||
:null "nullptr"))
|
|
||||||
#+END_SRC
|
|
||||||
** LSP
|
** LSP
|
||||||
Add lsp-ui-doc-mode to lsp-ui-mode: allows you to see documentation in a little
|
Add lsp-ui-doc-mode to lsp-ui-mode: allows you to see documentation in a little
|
||||||
VSCode style web-kit window.
|
VSCode style web-kit window.
|
||||||
|
|||||||
Reference in New Issue
Block a user