Sublime Forum

Sublime_rubocop needs a new maintainer

#1

Just want to bring this to folks’ attention.

sublime_rubocop is a popular plugin, officially recommended by Rubocop, but recently it started looking for a new maintainer.

Since this is the go-to for such a popular integration, perhaps someone here would be willing to take it on?

2 Likes

#2

I guess many are using the SublimeLinter plugin for rubocop these days.

Nevertheless, maybe it’d be good to move this project to the ST org - so that it is at least in a safe harbor for the future.

Edit: and maybe a PR for the rubocop Repo with a hint regarding SL would be helpful, might take a look into this when I find time.

0 Likes

#3

You’re right, I started using SublimeLinter for the first time since the post here (somehow it escaped me for over 11 years of using ST), and I’m impressed how stable it’s been at supervising linter processes, and how easily I could throw together my own. Only bug I found so far is that it seems to stop working after calling the Reload SublimeLinter and its plugins command.

Hm, maybe the right move is to change the official recommendation on Rubocop’s site then.

1 Like

#4

Or maybe someone would be interested in creating LSP-RuboCop, which should probably further deprecates SublimeLinter for rubocop.

https://docs.rubocop.org/rubocop/usage/lsp.html

1 Like

#5

While LSP is the modern approach, one thing that impressed me about SublimeLinter is how easy it is to create your own linter based on any existing CLI tool. Would be awesome if there was an LSP framework that’s just as easy to use. Or maybe it already is? Haven’t looked into this.

1 Like

#6

I didn’t really try since I don’t write Ruby codes. But I guess the following LSP settings provide basic functionalities.

{
    "clients": {
        "rubocop": {
            "enabled": true,
            "command": ["bundle", "exec", "rubocop", "--lsp"],
            "selector": "text.html.ruby | text.html.rails",
        },
    },
}
2 Likes

#7

Wow, this does look easy. Now that you’ve pointed me in this direction, I found that ruby-lsp already comes with rubocop support under the hood, so will explore it.

0 Likes

#8

That’s quite cool tbh. Note that changing the selector to "selector": "source.ruby | text.html.ruby | text.html.rails", makes it work in “normal” Ruby code.

0 Likes

#9

FTR, with the next release of RuboCop the docs should mention SublimeLinter as alternative as well as the LSP solutions.

1 Like

#10

Great! Found the PR, so linking it for posterity. I personally ended up with this setup, in case anyone is curious. Had to learn a few hard-to-find pieces of info to arrive there.

1 Like

#11

I’m quite a noob of LSP, but since this discussion is sort of related: I recently wrote a SublimeLinter plugin for Makefiles:


How hard would it be to turn it into a LSP plugin and support, for example, a go-to functionality for VARIABLE declarations? (or does it even make sense what I just said? =))

0 Likes