lsp stuff

This commit is contained in:
Janis 2024-12-21 20:58:57 +01:00
parent aae8a258f1
commit dbc0740a43

View file

@ -1375,23 +1375,39 @@ LSP sets it's prefix key to =s-l= by default, which uses the Super key which I u
) )
:config :config
(setq (setq
lsp-idle-delay 0.6 lsp-idle-delay 0.5
lsp-inlay-hint-enable t lsp-inlay-hint-enable t
lsp-modeline-code-actions-enable t lsp-modeline-code-actions-enable t
lsp-modeline-code-actions-segments '(name count) lsp-modeline-code-actions-segments '(name count)
lsp-modeline-diagnostics-enable t lsp-modeline-diagnostics-enable t
lsp-completion-enable-additional-text-edit t
lsp-glsl-executable '("glsl_analyzer")
lsp-rust-server 'rust-analyzer lsp-rust-server 'rust-analyzer
lsp-rust-analyzer-server-display-inlay-hints t lsp-rust-analyzer-server-display-inlay-hints t
lsp-rust-analyzer-proc-macro-enable t lsp-rust-analyzer-proc-macro-enable t
lsp-rust-analyzer-completion-auto-import-enable t
lsp-rust-analyzer-proc-macro-enable t
lsp-rust-analyzer-binding-mode-hints t lsp-rust-analyzer-binding-mode-hints t
lsp-rust-analyzer-display-closure-return-type-hints t lsp-rust-analyzer-display-closure-return-type-hints t
lsp-rust-analyzer-server-format-inlay-hints t) lsp-rust-analyzer-server-format-inlay-hints t)
(setq lsp-glsl-executable '("glsl_analyzer"))
(add-to-list 'lsp-language-id-configuration '("CMakeLists.txt" . "cmake")) (add-to-list 'lsp-language-id-configuration '("CMakeLists.txt" . "cmake"))
) )
(use-package consult-lsp
:straight t
:general
(with-eval-after-load 'lsp-mode
(general-define-key
:keymaps 'lsp-command-map
"c s" '("Symbols" . consult-lsp-symbols)
"c f" '("Symbols" . consult-lsp-file-symbols)
"c d" '("Diagnostics" . consult-lsp-diagnostics)
)
)
)
(use-package lsp-treemacs (use-package lsp-treemacs
:straight t :straight t
:commands lsp-treemacs-errors-list) :commands lsp-treemacs-errors-list)
@ -1437,7 +1453,7 @@ hlsl-mode:
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package rust-mode (use-package rust-mode
:straight t :straight t
:hook (rust-mode . lsp-mode) ;; :hook (rust-mode . lsp-mode)
:init :init
(setq rust-mode-treesitter-derive t (setq rust-mode-treesitter-derive t
)) ))
@ -1473,10 +1489,11 @@ hlsl-mode:
:keymaps 'rustic-mode-map :keymaps 'rustic-mode-map
"m" '(:keymap nemo/rust-map :wk "Cargo") "m" '(:keymap nemo/rust-map :wk "Cargo")
) )
:custom
(rustic-analyzer-command '("/usr/bin/rust-analyzer"))
:config :config
(setq rustic-format-trigger 'on-save) (setq rustic-format-on-save t
rustic-format-on-save-method #'rustic-format-buffer
rustic-analyzer-command '("/usr/bin/rust-analyzer")
)
) )
#+end_src #+end_src