Skip to content

Instantly share code, notes, and snippets.

@thomasaarholt
Last active December 14, 2023 09:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thomasaarholt/334785e0df442672d19b9e9b4a2d2f5c to your computer and use it in GitHub Desktop.
Save thomasaarholt/334785e0df442672d19b9e9b4a2d2f5c to your computer and use it in GitHub Desktop.
Ruff and pyright in helix
[[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 = "ruff"
args = ["format", "-"]
[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 = {run = "onSave" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment