standard icon indicating copy to clipboard operation
standard copied to clipboard

Editor support for Sublime Text

Open searls opened this issue 6 years ago • 8 comments

Get in touch with SublimeLinter and fork or extend SublimeLinter-rubocop

searls avatar Dec 13 '18 12:12 searls

As a sublime text user, I'll take a crack at this :)

davemo avatar Dec 17 '18 22:12 davemo

👏 👏 👏

searls avatar Dec 17 '18 22:12 searls

Haven't submitted it to packagecontrol yet, but here's a first attempt that appears to be working First attempt

Unfortunately SublimeLinter doesn't support fix commands so we may want to create a separate plugin for formatting on save.

noahpryor avatar Jan 06 '19 20:01 noahpryor

Cool! I wonder if @davemo has a chance to play with it

searls avatar Jan 07 '19 02:01 searls

I got as far as cloning the recommended Sublime plugin repo, but haven't touched it otherwise.

davemo avatar Jan 07 '19 14:01 davemo

The StandardRB linter plugin (https://github.com/testdouble/SublimeLinter-contrib-standardrb) was added to the SublimeLinter package control channel in https://github.com/SublimeLinter/package_control_channel/pull/90. There's an option in the plugin to let it play nice alongside the Rubocop linter. I'm sure there are still some rough edges (e.g. Some issues with paths on Windows) but I think it's a pretty stable first version.

cpruitt avatar Aug 13 '19 20:08 cpruitt

To clarify (after talking with @davemo). This version shows linter errors in the buffer window but doesn't yet support auto formatting. SublimeLinter works on temp copies of files so there's more work to be done to fix/format the source in the buffer view.

cpruitt avatar Aug 13 '19 21:08 cpruitt

It might be useful to see how PrettierJS handles this.

rpbaptist avatar Jun 25 '20 14:06 rpbaptist

This config works for me using Sublime LSP:

{
  "clients": {
    "ruby": {
      "enabled": true,
      "command": ["standardrb", "--lsp"],
      "selector": "source.ruby | text.html.ruby | source.ruby.rails",
      "initializationOptions": {
        "diagnostics": true
      }
    }
}

ocarreterom avatar Jan 07 '25 16:01 ocarreterom