Sublime Forum

SublimeLinter 4 beta

#1

SublimeLinter 4 beta

We’re making big improvements to how SublimeLinter works. You can read all the details here and track our progress in PR #666.

Participate in the beta right now by editing your Package Control preferences and adding SublimeLinter to the “install_prereleases” key:

"install_prereleases":
[
  "SublimeLinter"
]

Be sure to restart Sublime Text after the beta update installs.

A summary of what’s new

  • Highlight styles are more flexible and can be made linter-specific.
  • You can hover over errors or the gutter to view details.
  • Status bar info is more contextual and more useful.
  • Review all errors in a panel that can be filtered on severity, linter, or specific error codes.
  • Navigate errors using built-in next/prev_result commands.
  • Navigation uses the panel in the background, and therefore responds to the same filtering.
  • Less code, fewer commands, easier to maintain and use.

An example with different colors, highlight styles, and gutter icons for different linters:

Another big change is we no longer generate “(SL)” color schemes. It was intrusive and in a lot of cases unnecesary. Especially so in recent ST3 dev builds. If you’re on stable builds you may need to tweak the new styles setting to get the color you want, but it works out of the box with all default color schemes.

The future

We’re looking forward to your feedback to guide further improvements. There are some things we still want to refactor, test and improve and make it easier (more fun) to work on and maintain. We may also break a few more things, sorry about that.


Credits for a lot of the work go to @PyBen, lot’s of thanks also to @FichteFoll, @deathaxe, @gerry and others who have helped testing, and @groteworld for guidance.

Disclaimer: I’m sure we broke something, and so many things changed you will basically need to relearn how to use SublimeLinter. In the end it will all be worth it though.

14 Likes

#2

I should update this, we do actually seem to have implemented a solution for the path issues. It’s really worthwhile to check it out honestly, it’s pretty awesome really. :wink:

0 Likes

#3

can’t change the gutter themes

0 Likes

#4

You probably need to change the “icon” stylee from the default “dot” to an icon from the theme, which is usually “warning” and/or “error”.

0 Likes

#5

I don’t know if this is what you mean, but it didn’t change:

"styles": [
    {
        "icon": "warning",
        "mark_style": "outline",
        "priority": 1,
        "scope": "region.yellowish markup.changed.sublime_linter markup.warning.sublime_linter",
        "types": ["warning"]
    },
    {
        "icon": "error",
        "mark_style": "outline",
        "priority": 1,
        "scope": "region.redish markup.deleted.sublime_linter markup.error.sublime_linter",
        "types": ["error"]
    }],
    "gutter_theme": "Koloria"
0 Likes

#6

Can you perhaps share your full SublimeLinter user settings?

0 Likes

#7

That’s it; now icons don’t appear anymore and this shows up in the console:

SublimeLinter: error in SublimeLinter daemon: 
SublimeLinter: -------------------- 
SublimeLinter: Traceback (most recent call last):
  File "lint.queue in C:\Users\User\AppData\Roaming\Sublime Text 3\Installed Packages\SublimeLinter.sublime-package", line 47, in loop
  File "./python3.3/queue.py", line 175, in get
queue.Empty

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "lint.queue in C:\Users\User\AppData\Roaming\Sublime Text 3\Installed Packages\SublimeLinter.sublime-package", line 55, in loop
  File "lint.queue in C:\Users\User\AppData\Roaming\Sublime Text 3\Installed Packages\SublimeLinter.sublime-package", line 101, in lint
  File "sublime_linter in C:\Users\User\AppData\Roaming\Sublime Text 3\Installed Packages\SublimeLinter.sublime-package", line 253, in lint
  File "lint.linter in C:\Users\User\AppData\Roaming\Sublime Text 3\Installed Packages\SublimeLinter.sublime-package", line 1002, in lint_view
  File "sublime_linter in C:\Users\User\AppData\Roaming\Sublime Text 3\Installed Packages\SublimeLinter.sublime-package", line 306, in highlight
  File "lint.highlight in C:\Users\User\AppData\Roaming\Sublime Text 3\Installed Packages\SublimeLinter.sublime-package", line 91, in draw
  File "lint.highlight in C:\Users\User\AppData\Roaming\Sublime Text 3\Installed Packages\SublimeLinter.sublime-package", line 435, in draw
  File "lint.style in C:\Users\User\AppData\Roaming\Sublime Text 3\Installed Packages\SublimeLinter.sublime-package", line 53, in wrapper
KeyError: 'warning'
 
SublimeLinter: -------------------- 

NB: The test file (js file) only contains warnings

0 Likes

#8

I managed to make it work by providing the full path to the icon:

"styles": [
{
"icon": "Packages/SublimeLinter/gutter-themes/Koloria/warning.png",
"mark_style": "outline",
"priority": 1,
"scope": "region.yellowish markup.changed.s
"types": ["warning"]
},
{
"icon": "Packages/SublimeLinter/gutter-themes/Koloria/error.png",
"mark_style": "outline",
"priority": 1,
"scope": "region.redish markup.deleted.subl
"types": ["error"]
}],
// "gutter_theme": "Koloria "

NB:the “gutter_theme” key is unnecessairy here

0 Likes

#9

how can i disable a linter:

"linters": {
    "pylint": {
        "@disable": true
    }

this didn’t disable pylint.

0 Likes

#10

Its “disable”, without the @

0 Likes

#11

No, still showing up

0 Likes

#12

What version of Sublime Text and of SublimeLinter are you using and please also share your full SublimeLinter settings.

0 Likes

#13

Im using the latest dev build 3156 and SL 4 beta and here are my settings:

"styles": [
{
"icon": "Packages/SublimeLinter/gutter-themes/Kolor
"mark_style": "outline",
"priority": 1,
"scope": "region.yellowish markup.changed.s
"types": ["warning"]
},
{
"icon": "Packages/SublimeLinter/gutter-themes/Kolor
"mark_style": "outline",
"priority": 1,
"scope": "region.redish markup.deleted.subl
"types": ["error"]
}],
"linters": {
"pylint": {
"disable": true
}
0 Likes

#14

Ok, no clue what’s wrong then. Please report this and anything else you run into at the SL repo.

0 Likes

#15

I am just hear to ask the theme you are using on Sublime

0 Likes

#16

Adaptive on a Mac, with Monokai

0 Likes

#17

When do you plan to release a stable version?

Thanks.

1 Like

#18

We’re basically feature complete, but making some final changes to some settings. After that it’s just refactoring and testing. We’re not hurrying it though. I think right now it’s already more stable and reliable than the “stable” release. Unless you use project configuration a lot now is as good a time to start using version 4 as any.

2 Likes

#19

Ok, 4.0.0-rc.9.9.2 is tagged and I think we’re done messing with features and settings for a while. The docs are lagging behind, but if you have questions I’m here and on discord and you’re welcome to open issues as well. The more people get on board the better it’ll get.

Linter is coming!

ping @PyBen

3 Likes

#20

So… Bear with my derpiness, and I hope this does not come across as disrespectgul oe anything, but say I wanted to implement a linter for a custom language entirely on python. Could you point me to any tutorial to get me going? I could probably just try to figure it out from the docs but my time is really really limited so I would hugely appreciate if I were pointed to some ready-made walkthrough or learning example on the topic, the issue for me is that the time I could devote to this is really limited for me to having to figure everything from scratch.

0 Likes