You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm on the latest version of the rustic package and have things setup to run rustfmt on save. I'm passing the +nightly flag. Unfortunately, none of the settings in my repository's rustfmt.toml file are ever taken into account when saving through rustic. The package is formatting my code though with rustfmt, it just doesn't use my settings. Here's my configuration:
(use-package rustic
:hook (rustic-mode . yas-minor-mode)
:bind
(:map
rustic-mode-map
("M-j". lsp-ui-imenu)
("M-?". lsp-find-references)
("C-c C-c l". flycheck-list-errors)
("C-c C-c a". lsp-execute-code-action)
("C-c C-c r". lsp-rename)
("C-c C-c q". lsp-workspace-restart)
("C-c C-c Q". lsp-workspace-shutdown)
("C-c C-c s". lsp-rust-analyzer-status))
:init
(progn;; Use nightly rust for formatting.
(setq rustic-rustfmt-args "+nightly")
;; Use rustfmt on save.
(setq rustic-format-on-save t))
:config
(progn;; Use electric pair mode.
(electric-pair-mode1)
;; This fixes a bug, see below.
(add-hook'rustic-mode-hook'rk/rustic-mode-hook)))
(defunrk/rustic-mode-hook ()
;; Do this so that running C-c C-c C-r works without having to;; confirm, but don't try to save rust buffers that are not file;; visiting. Once https://github.com/brotzeit/rustic/issues/253;; has been resolved this should no longer be necessary.
(when buffer-file-name
(setq-local buffer-save-without-query t)))
This shouldn't matter as I use it everywhere, but here's my rustfmt.toml file as well:
Sadly this has rendered the package unusable for me at present, perhaps this is a bug?
The text was updated successfully, but these errors were encountered:
wusticality
changed the title
The rustfmt.toml file is not taken into account
The rustfmt.toml file is not taken into account when saving.
Jul 25, 2024
wusticality
changed the title
The rustfmt.toml file is not taken into account when saving.
The rustfmt.toml file is not taken into account when formatting / saving
Jul 25, 2024
wusticality
changed the title
The rustfmt.toml file is not taken into account when formatting / saving
The rustfmt.toml file is not taken into account when formatting
Jul 25, 2024
wusticality
changed the title
The rustfmt.toml file is not taken into account when formatting
The rustfmt.toml file is not taken into account when saving
Jul 25, 2024
I'm on the latest version of the
rustic
package and have things setup to runrustfmt
on save. I'm passing the+nightly
flag. Unfortunately, none of the settings in my repository'srustfmt.toml
file are ever taken into account when saving throughrustic
. The package is formatting my code though withrustfmt
, it just doesn't use my settings. Here's my configuration:This shouldn't matter as I use it everywhere, but here's my
rustfmt.toml
file as well:Sadly this has rendered the package unusable for me at present, perhaps this is a bug?
The text was updated successfully, but these errors were encountered: