Created
December 7, 2023 17:03
-
-
Save gdamjan/56a6bc79edb8d35e2c7af73e3426165e to your computer and use it in GitHub Desktop.
helix + pyright and ruff
This file contains 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
# ~/.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