Skip to content

Commit

Permalink
Cleanup rust setup
Browse files Browse the repository at this point in the history
  • Loading branch information
peel committed Mar 27, 2024
1 parent 0a883d2 commit 483d8fe
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions modules/common/setup/emacs/default.el
Original file line number Diff line number Diff line change
Expand Up @@ -269,15 +269,18 @@
(defun peel/eglot-imports ()
(interactive)
(call-interactively #'eglot-code-action-organize-imports))
(add-to-list 'eglot-server-programs '((go-mode go-ts-mode) .
("gopls" :initializationOptions
(:hints (:parameterNames t
:rangeVariableTypes t
:functionTypeParameters t
:assignVariableTypes t
:compositeLiteralFields t
:compositeLiteralTypes t
:constantValues t)))))
(add-to-list 'eglot-server-programs
'((go-mode go-ts-mode) .
("gopls" :initializationOptions
(:hints (:parameterNames t
:rangeVariableTypes t
:functionTypeParameters t
:assignVariableTypes t
:compositeLiteralFields t
:compositeLiteralTypes t
:constantValues t))))
'((rust-ts-mode rust-mode) .
("rust-analyzer" :initializationOptions (:check (:command "clippy")))))
:hook ((scala-mode . eglot-ensure)
(js-mode . eglot-ensure)
(typescript-mode . eglot-ensure)
Expand Down Expand Up @@ -350,8 +353,10 @@

(use-package rustic
:ensure t
:mode ("\\.rs?\\'" . rust-mode)
:mode ("\\.rs?\\'" . rustic-mode)
:after nix-sandbox
:config
(add-hook 'eglot--managed-mode-hook (lambda () (flymake-mode -1)))
:custom
(rustic-format-on-save t)
(rustic-lsp-client 'eglot))
Expand Down

0 comments on commit 483d8fe

Please sign in to comment.