💭 configuring pylsp · helix-editor/helix · Discussion #6623

!https://github.com/helix-editor/helix/discussions/6623

configuring pylsp · helix-editor helix · Discussion #6623
Hi, I'm trying to make some modifications to the default pylsp settings as I do not strictly follow PEP in my personal projects. I googled some examples but I cannot get them to work, so I am wonde...
GitHub · github.com

How to set your python formatter to black with helix. The following snippet lays out how to set the helix editor to auto-format on save with the black formatter.

[[language]]
name = "python"
language-servers = ["pylsp"]

[language-server.pylsp.config.pylsp]
plugins.pyls_mypy.enabled = true
plugins.pyls_mypy.live_mode = true
plugins.flake8.maxLineLength = 88
plugins.pycodestyle.maxLineLength = 88

[language.formatter]
command = "black"
args = ["--line-length", "88", "--quiet", "-"]

Note

This post is a thought. It’s a short note that I make about someone else’s content online #thoughts

Connections

Related tags and posts connected to this entry.