Skip to content

Instantly share code, notes, and snippets.

@gdamjan
Created December 7, 2023 17:03
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 gdamjan/56a6bc79edb8d35e2c7af73e3426165e to your computer and use it in GitHub Desktop.
Save gdamjan/56a6bc79edb8d35e2c7af73e3426165e to your computer and use it in GitHub Desktop.
helix + pyright and ruff
# ~/.config/helix/languages.toml
# add the language server
[language-server.pyright]
command = "pyright-langserver"
args = ["--stdio"]
# will get "Async jobs timed out" errors if this empty config is not added
config = {}
# tie python files to pyright
# this is simply replacing pylsp with pyright in master's languages.toml
[[language]]
name = "python"
scope = "source.python"
injection-regex = "python"
file-types = ["py","pyi","py3","pyw","ptl",".pythonstartup",".pythonrc","SConstruct"]
shebangs = ["python"]
roots = ["setup.py", "setup.cfg", "pyproject.toml"]
comment-token = "#"
language-servers = [ "pyright" ]
formatter = { command = "ruff", args = ["-"] }
indent = { tab-width = 4, unit = " " }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment