Fixed C# lsp

This commit is contained in:
Aleksandr Lebedev 2025-03-10 15:12:38 +01:00
parent fbb6984a57
commit 2d7e8f863a

View file

@ -1199,25 +1199,32 @@ Emacs has built-in programming language modes for Lisp, Scheme, DSSSL, Ada, ASM,
(global-treesit-auto-mode)) (global-treesit-auto-mode))
#+end_src #+end_src
** Eglot ** Eglot
*** C++ / C
#+begin_src emacs-lisp #+begin_src emacs-lisp
(with-eval-after-load 'eglot (with-eval-after-load 'eglot
(add-to-list 'eglot-server-programs (add-to-list 'eglot-server-programs
'((c-ts-mode c++-ts-mode) '((c-ts-mode c++-ts-mode)
. ("clangd" . ("clangd"
"-j=8" "-j=8"
"--log=error" "--log=error"
"--malloc-trim" "--malloc-trim"
"--background-index" "--background-index"
"--clang-tidy" "--clang-tidy"
"--cross-file-rename" "--cross-file-rename"
"--completion-style=detailed" "--completion-style=detailed"
"--pch-storage=memory" "--pch-storage=memory"
"--header-insertion=never" "--header-insertion=never"
"--header-insertion-decorators=0")) "--header-insertion-decorators=0")))
((csharp-ts-mode) . ("csharp-ls"))) (add-hook 'c-ts-mode-hook #'eglot-ensure)
(add-hook 'c-ts-mode-hook #'eglot-ensure) (add-hook 'c++-ts-mode-hook #'eglot-ensure))
(add-hook 'c++-ts-mode-hook #'eglot-ensure) #+end_src
(add-hook 'csharp-ts-mode-hook #'eglot-ensure)) *** C#
#+begin_src emacs-lisp
(with-eval-after-load 'eglot
(add-to-list 'eglot-server-programs
'(csharp-ts-mode
. ("csharp-ls")))
(add-hook 'csharp-ts-mode-hook #'eglot-ensure))
#+end_src #+end_src
* Nerd Icons * Nerd Icons
#+begin_src emacs-lisp #+begin_src emacs-lisp