break up big lsp codeblock, move debugging which depends on lsp to the lsp section

This commit is contained in:
janis 2025-09-15 22:18:08 +02:00
parent 3ea8e00384
commit 680b07e3b4
Signed by: janis
SSH key fingerprint: SHA256:bB1qbbqmDXZNT0KKD5c2Dfjg53JGhj7B3CFcLIzSqq8

View file

@ -1747,6 +1747,10 @@ LSP sets it's prefix key to =s-l= by default, which uses the Super key which I u
(advice-add 'lsp-resolve-final-command :around #'lsp-booster--advice-final-command)
)
#+end_src
Install =consult-lsp=:
#+begin_src emacs-lisp
(use-package consult-lsp
:straight t
:general
@ -1759,11 +1763,17 @@ LSP sets it's prefix key to =s-l= by default, which uses the Super key which I u
)
)
)
#+end_src
Install =lsp-treemacs=:
#+begin_src emacs-lisp
(use-package lsp-treemacs
:straight t
:commands lsp-treemacs-errors-list)
#+end_src
Install =lsp-ui=:
#+begin_src emacs-lisp
(use-package lsp-ui
:config
(setq
@ -1778,7 +1788,10 @@ LSP sets it's prefix key to =s-l= by default, which uses the Super key which I u
; lsp-ui-doc-use-webkit t
)
:commands lsp-ui-mode)
#+end_src
register my own mode for formatting on save:
#+begin_src emacs-lisp
(defvar-local nemo/lsp-format-on-save t)
(define-minor-mode nemo/lsp-format-on-save-mode
@ -1793,7 +1806,10 @@ LSP sets it's prefix key to =s-l= by default, which uses the Super key which I u
"Format on save using LSP server."
(if nemo/lsp-format-on-save
(lsp-format-buffer)))
#+end_src
Improve lsp speed by using =lsp-booster=:
#+begin_src emacs-lisp
(defun lsp-booster--advice-json-parse (old-fn &rest args)
"Try to parse bytecode instead of json."
(or
@ -1827,6 +1843,24 @@ Make lsp use plists instead of hash-tables:
#+begin_src emacs-lisp
(add-to-list 'exec-path-from-shell-variables "LSP_USE_PLISTS")
#+end_src
*** Debugging
#+begin_src emacs-lisp
(use-package dap-mode
:straight t
:config
;; (require 'dap-cpptools)
;; (dap-cpptools-setup)
(require 'dap-gdb-lldb)
(dap-register-debug-template "Rust::GDB Run Configuration"
(list :type "gdb"
:request "launch"
:name "GDB::Run"
:gdbpath "rust-gdb"
:target nil
:cwd nil))
(dap-auto-configure-mode))
#+end_src
** Graphics
@ -2178,24 +2212,6 @@ delimiters < and >'s."
:defer t)
#+end_src
** Debugging
#+begin_src emacs-lisp
(use-package dap-mode
:straight t
:config
;; (require 'dap-cpptools)
;; (dap-cpptools-setup)
(require 'dap-gdb-lldb)
(dap-register-debug-template "Rust::GDB Run Configuration"
(list :type "gdb"
:request "launch"
:name "GDB::Run"
:gdbpath "rust-gdb"
:target nil
:cwd nil))
(dap-auto-configure-mode))
#+end_src
** Web
#+begin_src emacs-lisp
(use-package web-mode