Created
August 4, 2023 18:51
-
-
Save thomasaarholt/b90142c0523525e8a47cfd4f95011bd5 to your computer and use it in GitHub Desktop.
Helix languages.toml setup for Python with pyright, ruff and black
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[language]] | |
name = "python" | |
scope = "source.python" | |
injection-regex = "python" | |
file-types = ["py","pyi","py3","pyw",".pythonstartup",".pythonrc"] | |
shebangs = ["python"] | |
roots = [".", "pyproject.toml", "pyrightconfig.json"] | |
comment-token = "#" | |
language-servers = ["pyright", "ruff"] | |
indent = { tab-width = 4, unit = " " } | |
auto-format = true | |
[language.formatter] | |
command = "black" | |
args = [ | |
"-", | |
"--quiet", | |
"--line-length=88" | |
] | |
[language-server.pyright] | |
command = "pyright-langserver" | |
args = ["--stdio"] | |
[language-server.pyright.config] | |
reportMissingTypeStubs = false | |
[language-server.pyright.config.python.analysis] | |
typeCheckingMode = "basic" | |
autoImportCompletions = true | |
[language-server.ruff] | |
command = "ruff-lsp" | |
[language-server.ruff.config] | |
settings = {args = []} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment