SublimeLinter

The code linting framework for Sublime Text

MIT License

Stars
2K

Bot releases are visible (Hide)

SublimeLinter - 4.25.0 Latest Release

Published by kaste 5 months ago

--- @WZ-Tong implemented the setting show_panel_on_save.ignored_error_types to suppress the automatic panel popup for certain error types.

You could set it to ["info", "hint"] for example.

That's it, sincerely,
πŸ’•

SublimeLinter - 4.24.3

Published by kaste 6 months ago

  • Redo the hot-fix applied to 4.24.2
  • Never choose the user's HOME directory as the project root only because it has some configuration files in it.
  • Fix edge-case in the squiggles code. Apparently sometimes Sublime can't compute a foreground color for a given scope; just fallback in those cases.
SublimeLinter - 4.24.2

Published by kaste 6 months ago

Reloading always threw a RuntimeError. That doesn't have to be so. (#1937)

SublimeLinter - 4.24.1

Published by kaste 6 months ago

The current stable version of Sublime Text, build 4169, has a bug requiring a
restart after a fresh and clean install of SublimeLinter.
This release just adds an installation note about that.

SublimeLinter - 4.24.0

Published by kaste 6 months ago

That's it: we say Goodbye to Sublime Text 3 and run on the Python 3.8 host.
You may want to restart.

How is this implemented? On Sublime's startup and when you install/remove
packages using Package Control we automatically lift all SL adapters/addons
to the 3.8 host. This is necessary as it is impossible to get cooperation
in a single step and limited timeline for 100+ repos. Over time these helper
packages may eventually update and Sublime Linter will remove the "lifts".

During that period it may or may not be necessary to restart Sublime Text
after upgrades of such plugins. This is currently unknown as I (and we) don't
have much experience in these processes. This is a novel approach after all.
That being said, on my machine installing and uninstalling is seamless and
just worksℒ️.

Sincerely,
πŸ’•

Yes, I do enjoy coffee: https://paypal.me/herrkaste

SublimeLinter - 4.23.5

Published by kaste 7 months ago

I ridiculously screwed the 4.35.4 tag. (That was not installable 😬.) So we ship a new one.

SublimeLinter - 4.23.4

Published by kaste 7 months ago

Prepare for the python 3.8 plugin host.

SublimeLinter - 4.23.3

Published by kaste 8 months ago

  • Recover BrokenPipe errors on Windows by backporting python's Popen._communicate from recent python versions
SublimeLinter - 4.23.2

Published by kaste 9 months ago

Fix 4.23.1 which pointed to the wrong commit. 🀷

SublimeLinter - 4.23.1

Published by kaste 9 months ago

Maintenance release with no intended behavioral changes.

SublimeLinter - 4.23.0

Published by kaste about 1 year ago

Summer maintenance, updated documentation and a very tiny addition from @harrymander (#1917).
Without that addition it would have been a patch release but so it's a "minor". πŸ˜€

SublimeLinter - 4.22.0

Published by kaste over 1 year ago

--- @mataha improved our Yarn support drastically (#1899).

--- There is a new setting "highlights.start_hidden": ["phantoms"],.

(I actually promised this for 4.20.0 but it wasn't there yet.)

Use this to hide possible drawn inline phantoms initially, and then toggle
them when needed. Really like you might do with the error panel, but then
with the error details inlined.

You might try a key-binding for fast toggling:

```
{ "keys": ["ctrl+k", "ctrl+k"],
  "command": "sublime_linter_toggle_highlights",
  "args": {"what": ["phantoms"]}
},
```

--- Implement disable_if_not_dependency for Python based linters, useful
if you don't want to use globally installed binaries.

Sincerely,
πŸ’•

Yes, I do drink coffee: https://paypal.me/herrkaste

SublimeLinter - 4.21.0

Published by kaste over 1 year ago

Only for Python based linters

For the default experience, t.i. you did not set executable or working_dir etc. I improved
how we find a possible virtual environment. We also try to find a project root and set the
working_dir to that now. (Generally we go from the file currently open upwards the directory
hierarchy whereby before we always just used one of the open folders from the Sublime
sidebar.)
Note that we detect virtual environments from "poetry" and "Pipenv" if we find some marker
files (usual their .lock files) in your project. I actually prefer local folders, and we detect them
when they're named "venv", ".env", or ".venv".

Finally, if you set python to a specific version and are on Windows, we now just use your py.exe
(which is typically installed on Windows and placed on PATH) to find the correct python.
For the benefit that not all the various python versions have to be visible on the PATH.

And yes, I do drink coffee: https://paypal.me/herrkaste
❀️

SublimeLinter - 4.20.3

Published by kaste over 1 year ago

  • Fix possible deadlock (freezing) ( πŸ‘€ 😳) of Sublime Text. Special thanks to @onlyhavecans for reporting #1891
SublimeLinter - 4.20.1

Published by kaste almost 2 years ago

@jareha fixed some typos in our settings file (#1884) and I fixed a small formatting issue in our logging (#1887).

SublimeLinter - 4.20.0

Published by kaste about 2 years ago

Finally, I mean: f i n a l l y, we have annotation and inline phantoms[*].

-- By default, nothing changes, you have to opt-in.

Here's how it goes as it is a bit tricky and also sophisticated:

++ Everything is configured within the styles section in the global
SublimeLinter settings. For that to work, the style definitions accept two
new keys, namely annotation and phantom.

These are template strings, therefore e.g. "{code}", "{msg}", "{linter}"
are typical values used here.
Use "" (the default) to turn this feature off.

Because this is implemented as "style" of an error, you can adjust and
fine-tune the feature for each linter separately. (°°)

This is extremely important to reduce clutter and noise where possible.
Because, believe me, this can lead to clutter and noise.

For example, while writing, you often produce intermittent syntax errors.
But that is natural for writing and shouldn't produce too much visual
distraction. You can for example define

"mypy": {
    "styles": [
        {
            "codes": ["syntax"],  # mypy's rule/code for syntax errors
            "icon": "cog",
            "phantom": "",        # no inline phantoms
            "annotation": "πŸ’£",   # an icon on the right side
        },
        {
            "phantom": "{msg}",   # for all other reported problems
        }
    ],
},

to mitigate this effect.

E.g. for "annotations", everything is already pretty much in the code. You
could try:

"annotations": {
    "styles": [
        {
            "types": ["error"],
            "scope": "region.redish",
            "annotation": "!"
        },
        {
            "annotation": "",
            "phantom": ""
        },
    ]
},

Especially phantoms are both annoying and the best thing since sliced bread.
So we only show them for "errors" (not for "warnings" etc) as long as there
are any errors and only then also for warnings and other types. Yeah, that
should probably be pluggable but then I would never release anything.

To quickly toggle the phantoms you can use our sublime_linter_toggle_highlights
command. By default it toggles both the squiggles and the inline phantoms but: --

{ "keys": ["ctrl+k", "ctrl+k"],
  "command": "sublime_linter_toggle_highlights",
  "args": {"what": ["phantoms"]}  // or "squiggles"
},

-- this is already pluggable.

Sincerely,
❀️

And yes, I do drink coffee: https://paypal.me/herrkaste

[*] Annotations are small text fields on the right hand side of the view at
the same line of an error. Because of that they usually have not much
space to show anything.
Phantoms appear right below the error and use the full width of the view.
They make clear what an error is about, have lots of space but - if you
have lots of them in a small section - the actual code might get too
interspersed.

SublimeLinter - 4.19.0

Published by kaste about 2 years ago

Howdy,

--- we slightly refreshed the panel design.

--- we auto detect more python environments. Typical local installation on
".env" or ".venv" (where Kenneth' put these) and poetry are supported.

--- in the styles settings, code is now a prefix match. For example:

    {
        "codes": ["E3", "E2"],
        "scope": "comment",
    },

will match against rules "E302", "E304", ...

Handy for all linters that organize the rules like hierarchical
namespaces, like e.g. rubocop and eslint. (E.g. "prettier/")

--- there is now a global on/off switch. This is useful for example for
plugins with special views. For example, GitSavvy now lints the commit
message views which was not possible before as these scratch, temporary,
widget-like views were always skipped.

But you can also turn SublimeLinter off on a per project basis.

{
    "folders": [{ "path": "." }],
    "settings": {
        "SublimeLinter.enabled?": false,
    }
}

--- and a spelling fixer for the codespell linter

+++ the usual maintenance commits

https://github.com/SublimeLinter/SublimeLinter/compare/4.18.0...4.19.0 🌐

SublimeLinter - 4.18.0

Published by kaste almost 3 years ago

  • @Narretz added quick ignore actions for shellcheck (#1828)

https://github.com/SublimeLinter/SublimeLinter/compare/4.17.0...4.18.0

SublimeLinter - 4.17.0

Published by kaste over 3 years ago

Mostly shipping maintenance, we have two notable changes for plugins:

  • Beside the obvious line and col you can now capture end_line and
    end_col in the regexes. The low level LintMatch usually used with JSON
    formats also understands these keys of course.

  • If a plugin wants to log something, no need to import logging; ... anymore,
    as there is a configured self.logger now.

    As a reminder:

    • self.logger.info("message") only emits in debug mode
    • self.logger.warning("message") always emits to Sublime's builtin console
    • self.logger.error("message") popups a panel (usually don't!)

https://github.com/SublimeLinter/SublimeLinter/compare/4.16.3...4.17.0

SublimeLinter - 4.16.3

Published by kaste over 3 years ago

Minor fixes

  • Teach our settings validator to allow arbitrary error types (#1792)
  • Ensure to skip file-on-disk linters on unnamed buffers (#1793)
Badges
Extracted from project README
tests
Related Projects