helix-editor / helix

A post-modern modal text editor.
https://helix-editor.com
Mozilla Public License 2.0
32.46k stars 2.4k forks source link

How to use a linter (e.g. pylint) in Helix? #2743

Closed MarkuBu closed 2 years ago

MarkuBu commented 2 years ago

I follow the exercism track for Python and I noticed a hint from pylint on the exercism page. That wasn't shown in Helix. But Python LSP is running and shows errors, even formatting errors.

Is it possible to use a linter in Helix, manually or automatically?

ghost commented 2 years ago

If you're using pylsp, you just need to install pylint pip install "python-lsp-server[pylint]" and then edit your languages.toml something like this:

[[language]]
name = "python"
config = { pylsp.plugins.pylint.enabled = true } 

You can check python-lsp-server/CONFIGURATION.md for more detail about configuration

MarkuBu commented 2 years ago

It seems that pylint is already running, but not configured for this type of error. But thanks for your help.

Esnos33 commented 1 year ago

Hi @MarkuBu, do you know how can I restart pylint? The only thing that works is to :wq and open file again.

MarkuBu commented 1 year ago

Hi @MarkuBu, do you know how can I restart pylint? The only thing that works is to :wq and open file again.

Sorry, I currently don't use Helix and Python

thomasaarholt commented 11 months ago

Hi @MarkuBu, do you know how can I restart pylint? The only thing that works is to :wq and open file again.

Bit late here, but you can do :lsp-restart.