Eglot ts cpp

This commit is contained in:
Aleksandr Lebedev 2025-03-09 20:40:57 +01:00
parent 1012861330
commit 48029097a5

View file

@ -72,6 +72,7 @@
- [[#nix][Nix]]
- [[#cmake][CMake]]
- [[#global-treesitter][Global treesitter]]
- [[#eglot][Eglot]]
- [[#nerd-icons][Nerd Icons]]
- [[#nerd-icons-completion][Nerd Icons Completion]]
- [[#persist-state][Persist state]]
@ -1197,6 +1198,25 @@ Emacs has built-in programming language modes for Lisp, Scheme, DSSSL, Ada, ASM,
:config
(global-treesit-auto-mode))
#+end_src
** Eglot
#+begin_src emacs-lisp
(with-eval-after-load 'eglot
(add-to-list 'eglot-server-programs
'((c-ts-mode c++-ts-mode)
. ("clangd"
"-j=8"
"--log=error"
"--malloc-trim"
"--background-index"
"--clang-tidy"
"--cross-file-rename"
"--completion-style=detailed"
"--pch-storage=memory"
"--header-insertion=never"
"--header-insertion-decorators=0")))
(add-hook 'c-ts-mode-hook #'eglot-ensure)
(add-hook 'c++-ts-mode-hook #'eglot-ensure))
#+end_src
* Nerd Icons
#+begin_src emacs-lisp
(use-package nerd-icons