diff options
| -rw-r--r-- | custom/jao-custom-programming.el | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/custom/jao-custom-programming.el b/custom/jao-custom-programming.el index fa2f978..e357e38 100644 --- a/custom/jao-custom-programming.el +++ b/custom/jao-custom-programming.el @@ -63,11 +63,11 @@ (setq eglot-events-buffer-config '(:size 1000 :format full) eglot-autoshutdown t) :config - (add-to-list 'eglot-server-programs - '((python-base-mode :language-id "python") . ("ty" "server"))) ;; :config (add-to-list 'eglot-stay-out-of 'flymake) :hook (eglot-managed-mode . jao-eglot-managed-mode-hook) - :bind (:map eglot-mode-map (("C-h ." . jao-eldoc-toggle)))) + :bind (:map eglot-mode-map (("C-h ." . jao-eldoc-toggle) + ("C-c a" . eglot-code-actions) + ("C-c r" . eglot-rename)))) ;;;; paredit and parens (require 'paren) @@ -313,30 +313,18 @@ (use-package rust-mode :ensure t :hook (rust-mode . jao-rust-mode-hook) - :init - (with-eval-after-load 'eglot - (add-to-list 'eglot-server-programs - `(rust-mode . ("rust-analyzer" - :initializationOptions - (:check (:command "clippy") ;; (:command "check") - :procMacro - (:enable t :ignored - (:async-trait ["async-trait"])) - :diagnostics (:disable ["unlinked-file"])))))) :config (setq rust-mode-treesitter-derive t) (use-package smartparens-rust :demand t) (defun jao-rust-mode-hook () - (smartparens-mode 1) + ;; (smartparens-mode 1) ;; (hs-minor-mode) (setq-local completion-styles '(basic substring partial-completion emacs22))) :bind (:map rust-mode-map ("C-c C" . jao-rust-open-cargo) - ("C-c a" . eglot-code-actions) ("C-c m" . jao-transient-flymake) - ("C-c r" . eglot-rename) ("C-c C-e" . consult-eglot-symbols))) (use-package rustic @@ -344,10 +332,23 @@ :after (rust-mode) :config (setq rustic-format-on-save nil - rustic-lsp-client 'eglot) ;; 'lsp-mode 'eglot nil + rustic-lsp-client 'eglot + rustic-lsp-check-command "clippy") + ;; rustic's settings for eglot are not working properly, we can just set our + ;; server afterwards and leave that alone. + (with-eval-after-load 'eglot + (add-to-list 'eglot-server-programs + `((rust-mode rustic-mode) + . ("rust-analyzer" + :initializationOptions + (:check + (:command "clippy") + :procMacro + (:enable t :ignored (:async-trait ["async-trait"])) + :diagnostics + (:disabled ["macro-error"])))))) :custom (rustic-cargo-use-last-stored-arguments nil) - (rustic-analyzer-command '("rust-analyzer")) (rustic-cargo-test-runner 'nextest) (rustic-cargo-nextest-exec-command '("nextest" "run" "--color=never" "--show-progress=none")) :bind (:map rustic-mode-map (("C-c d" . jao-rust-build-doc) |
