Closed reagle closed 6 years ago
We did a lot of messaging about this, but you probably missed all of it. Some reading material:
https://github.com/SublimeLinter/SublimeLinter/blob/master/messages/4.0.0.txt
https://forum.sublimetext.com/t/sublimelinter-4-beta/34022/37
Where are user settings supposed to go?
The defaults on the left show lot's of info here. You just copy them over and adjust, if you need to change something. Same as with every other package.
How does one enable/disable linters for specific file types?
https://github.com/SublimeLinter/SublimeLinter/blob/master/docs/linter_settings.rst
@braver, thanks for the links, 4.0.0.txt
was helpful. I think I have the basics working now, except I have some toggle and gutter issues.
Have a set something wrong?
{
"debug": false,
"delay": 0.25,
"gutter_theme": "Default",
"lint_mode": "background",
"linters":
{
"pycodestyle":
{
"disable": false,
"args": [],
"excludes": [],
"ignore": ["E124", "E241", "W503", "E701"],
"max-line-length": null,
"selector": "source.python"
},
"writegood":
{
"disable": false,
"args": ["--no-adverb", "--no-weasel",],
"selector": "text.html.markdown",
"excludes": [],
}
},
"no_column_highlights_line": false,
"paths":
{
"linux": [],
"osx": [],
"windows": []
},
"show_marks_in_minimap": true,
"syntax_map":
{
"html (django)": "html",
"html (rails)": "html",
"html 5": "html",
"javascript (babel)": "javascript",
"magicpython": "python",
"php": "html",
"python django": "python",
"pythonimproved": "python"
},
}
Those settings look reasonable.
When using writegood I don't want anything in the gutter. Can I set this?
You add styles for that linter and set the icon to "none":
"writegood": {
"styles": [
{
"scope": "",
"priority": 0,
"icon": "none",
"types": ["error", "warning"]
},
]
}
When I use writegood, I'd like to quickly toggle the linter on and off. This is no longer possible?
No, we don't have that yet. We will introduce a "save" only mode that only runs on save. There is a command "Toggle Highlights" that removes the highlighting. So it will run in the background, but if you want to check the errors you can quickly toggle the highlights on and off.
When I use pycodestyles, I want to see indicators in the gutter, but nothing is there.
Perhaps start by removing settings that simply reflect the defaults:
"debug": false,
"delay": 0.25,
"gutter_theme": "Default",
"lint_mode": "background",
"show_marks_in_minimap": true,
"no_column_highlights_line": false,
"paths":
{
"linux": [],
"osx": [],
"windows": []
},
"show_marks_in_minimap": true,
"syntax_map":
{
"html (django)": "html",
"html (rails)": "html",
"html 5": "html",
"javascript (babel)": "javascript",
"magicpython": "python",
"php": "html",
"python django": "python",
"pythonimproved": "python"
},
There is no need to have them set in your file and not having them will save your trouble later.
Then, I'd like to know the color scheme you're using and perhaps see a screenshot of those missing icons. We should be able to figure out what's what.
I have
{ "keys": ["ctrl+k", "ctrl+k"],
"command": "sublime_linter_toggle_highlights"
},
and it's đź‘Ť
That should probably be referenced in the default bindings? Not as being active but at least in a comment.
Thanks for the suggestions. My simplified version is:
{
"linters":
{
"pycodestyle":
{
"disable": false,
"args": [],
"excludes": [],
"ignore": ["E124", "E241", "W503", "E701"],
"max-line-length": null,
"selector": "source.python"
},
"writegood":
{
"disable": false,
"args": ["--no-adverb", "--no-weasel",],
"selector": "text.html.markdown",
"excludes": [],
"styles": [
{
"scope": "",
"priority": 0,
"icon": "none",
"types": ["error", "warning"]
},
]
}
},
}
For write-good, "icon": "none" does disable the gutter as requested, however, I don't see highlights...?
I have a different problem with pycodestyles. As you can see, I have a highlight at line 1341, but not gutter, which I also want. (The gutter shows parens when my line is on it, but even if I move off that line, there's nothing in the gutter.)
Just to take that out of the equation, can you try with the monokai color scheme?
Oh, those squirlies in the second screenshot aren’t from SublimeLinter but probably from the spell checker.
The icon in the gutter on the 2nd is from parenthesis matching.
Removing the color scheme from my preferences restores the gutter icon in python and highlights in markdown. It looks like I don't have to modify color schemes anymore to get them to work with SL, but is there a list of schemes that are known to work? (If I understand correctly.)
Also, probably the brackethighlighter plugin is overriding our icons, and it doesn’t seem to have config to stop it from doing that (Gitgutter does).
All default color schemes work. If you use ST dev releases all color schemes work. If you use something else, you may need to tweak he styles setting: https://github.com/SublimeLinter/SublimeLinter/blob/master/docs/settings.rst#styles-colors
Okay, thanks for the help!
Since SL4 was pushed to packagecontrol my linting is fubar.
SublimeLinter (old).sublime-settings
file in~/Library/Application Support/Sublime Text 3
; so I started with a newSublimeLinter.sublime-settings
."@disable": true,
. I no longer seem to have an option for toggling specific linters on and off via command palette.I've checked the documentation, but I don't see answers to my questions: