diff options
Diffstat (limited to 'user/emacs')
-rw-r--r-- | user/emacs/init.el | 54 |
1 files changed, 14 insertions, 40 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el index 00a3598f..858aa98a 100644 --- a/user/emacs/init.el +++ b/user/emacs/init.el @@ -576,8 +576,8 @@ _p_rev _u_pper _=_: upper/lower _r_esolve (global-eldoc-mode +1))) (use-package eldoc-box - :after (eldoc lsp-mode) - :ghook ('lsp-managed-mode #'eldoc-box-hover-mode)) + :after (eldoc eglot) + :ghook ('eglot-managed-mode #'eldoc-box-hover-mode)) (use-package ehelp :defer 15) @@ -747,9 +747,7 @@ _p_rev _u_pper _=_: upper/lower _r_esolve (use-package rustic :mode (("\\.rs\\'" . rustic-mode)) :config (progn - (setq rustic-format-on-save t - lsp-rust-analyzer-display-inlay-hints t - lsp-rust-analyzer-cargo-watch-command "clippy") + (setq rustic-format-on-save t) (with-eval-after-load 'flycheck (add-to-list 'flycheck-checkers 'rustic-clippy)))) @@ -963,9 +961,8 @@ _p_rev _u_pper _=_: upper/lower _r_esolve (use-package tree-sitter-indent :ghook ('(rustic-mode-hook))) -(use-package lsp-mode - :defer 2 - :general (:states 'normal :keymaps 'lsp-mode-map +(use-package eglot + :general (:states 'normal :keymaps 'eglot-mode-map "gd" #'xref-find-definitions "gr" #'xref-find-references "C-t" #'xref-pop-marker-stack) @@ -978,38 +975,16 @@ _p_rev _u_pper _=_: upper/lower _r_esolve scss-mode-hook html-mode-hook haskell-mode-hook) - #'lsp-deferred) - :ghook ('lsp-mode-hook #'lsp-enable-which-key-integration) - :config (progn - (setq lsp-auto-guess-root t - lsp-auto-configure nil - lsp-idle-delay 0.5 - lsp-enable-symbol-highlighting nil - lsp-eldoc-render-all t) - (add-to-list 'lsp-language-id-configuration '(js-mode . "javascript")))) - -(use-package lsp-javascript - :after (lsp-mode)) - -(use-package lsp-ui - :after lsp-mode - :ghook ('lsp-mode-hook) - :general (:states 'normal :keymaps 'lsp-ui-mode-map - "gd" #'lsp-ui-peek-find-definitions - "gr" #'lsp-ui-peek-find-references - "C-t" #'lsp-ui-peek-jump-backward) + #'eglot-ensure) :config (progn - (setq lsp-enable-snippet nil - lsp-ui-sideline-show-code-actions nil - lsp-ui-sideline-enable t - lsp-ui-doc-enable nil - lsp-ui-peek-always-show t))) - -(use-package lsp-ivy - :after (lsp ivy)) + (add-to-list 'eglot-stay-out-of 'company) + (defun my/setup-eglot-eldoc () + (push 'flymake-eldoc-function eldoc-documentation-functions)) + (add-hook 'eglot-managed-mode-hook 'my/setup-eglot-eldoc))) -(use-package lsp-haskell - :after lsp-mode) +(use-package consult-eglot + :commands (consult-eglot-symbols) + :after eglot) ;; Inside a javascript project, it's common to install tools locally to ;; the project. This will allows emacs to find their executables. @@ -1103,8 +1078,7 @@ _p_rev _u_pper _=_: upper/lower _r_esolve "w" '(:keymap evil-window-map :package evil) "x" '(:keymap ctl-x-map) "c" (general-simulate-key "C-c") - "l" '(:keymap lsp-command-map :package lsp-mode) - "j" #'lsp-ivy-workspace-symbol + "j" #'consult-eglot-symbols "q" #'evil-delete-buffer "p" '(:keymap projectile-command-map :package projectile) "v" #'split-window-right |