Skip to content

Instantly share code, notes, and snippets.

@ybiquitous
Last active June 28, 2023 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ybiquitous/43388edf464f56ef7f650a2b21553b90 to your computer and use it in GitHub Desktop.
Save ybiquitous/43388edf464f56ef7f650a2b21553b90 to your computer and use it in GitHub Desktop.
lsp-mode configuration for RuboCop
(with-eval-after-load 'lsp-mode
(lsp-register-client
(make-lsp-client :new-connection (lsp-stdio-connection '("bundle" "exec" "rubocop" "--lsp"))
:activation-fn (lsp-activate-on "ruby")
:add-on? t
:server-id 'rubocop-ls)))
@ybiquitous
Copy link
Author

An example in .dir-locals.el

((ruby-mode . ((lsp-enabled-clients . (rubocop-ls))
               (eval . (lsp)))))

@ybiquitous
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment