standard icon indicating copy to clipboard operation
standard copied to clipboard

Editor support for Emacs

Open searls opened this issue 7 years ago • 4 comments

Fork rubocop-emacs, maybe?

searls avatar Dec 13 '18 12:12 searls

Adding support to Flycheck (either directly or via extension) might be a better option for Emacs support. Spacemacs uses it by default, so I think it's rather popular. And I think it would avoid the need to build a standardrb-mode.

rosston avatar Dec 13 '18 14:12 rosston

Re Flycheck: it's probably worth noting that there probably won't be support for fixing anytime soon, judging by https://github.com/flycheck/flycheck/issues/530.

rosston avatar Dec 13 '18 14:12 rosston

I could write a formatter definition for format-all.

knu avatar Dec 13 '18 14:12 knu

Howdy, updates for this issue:

@knu did indeed write a formatter, which is now part of format-all: https://github.com/lassik/emacs-format-all-the-code/pull/107

I got standardrb linting + auto format on save working yesterday with standardrb, the newest version of format-all, flycheck-standardrb, and the following config in a .dir-locals.el file in my project directory:

((ruby-mode
  (format-all-formatters ("Ruby" standardrb))
  (eval . (format-all-mode 1))
  (flycheck-disabled-checkers . 'ruby-rubocop)))

I'm using doom-emacs and the version of format-all currently included with it appears to be pretty old, so I had to explicitly install a newer version. There's an open issue about this on the doom emacs repo. Mentioning that here just because doom is quite popular these days!

mkornblum avatar Nov 02 '21 20:11 mkornblum