2026-10-22 18:55:10 +08:00
|
|
|
id = "python"
|
|
|
|
|
name = "Python"
|
|
|
|
|
extensions = ["py", "pyi", "pyw"]
|
|
|
|
|
filenames = ["SConstruct", "SConscript"]
|
|
|
|
|
first-line = "^#!.*\\bpython[0-9.]*\\b"
|
|
|
|
|
line-comment = "#"
|
|
|
|
|
indent = { tab-size = 4, insert-spaces = true }
|
|
|
|
|
ui-mode = "Python"
|
|
|
|
|
tree-sitter = "python"
|
|
|
|
|
|
|
|
|
|
[[language-servers]]
|
|
|
|
|
name = "basedpyright"
|
|
|
|
|
command = "basedpyright-langserver"
|
|
|
|
|
args = ["--stdio"]
|
|
|
|
|
root-markers = ["pyproject.toml", "setup.py", "setup.cfg", "requirements.txt", "Pipfile", "pyrightconfig.json"]
|
|
|
|
|
install-hint = "pip install basedpyright (or: uv tool install basedpyright)"
|
|
|
|
|
|
2026-10-28 09:07:50 +08:00
|
|
|
# basedpyright defaults to "recommended", which flags unannotated attributes and
|
|
|
|
|
# every unknown type. "standard" reports real problems; a project's own
|
|
|
|
|
# `[tool.basedpyright]` / pyrightconfig.json still takes precedence.
|
|
|
|
|
[language-servers.initialization-options.settings.basedpyright.analysis]
|
|
|
|
|
typeCheckingMode = "standard"
|
|
|
|
|
# Off whenever analysis settings are sent without it: `src/` layouts would stop resolving.
|
|
|
|
|
autoSearchPaths = true
|
|
|
|
|
|
2026-10-22 18:55:10 +08:00
|
|
|
[[language-servers]]
|
|
|
|
|
name = "pyright"
|
|
|
|
|
# Alternative: used only when the server above is not installed.
|
|
|
|
|
fallback = true
|
|
|
|
|
command = "pyright-langserver"
|
|
|
|
|
args = ["--stdio"]
|
|
|
|
|
root-markers = ["pyproject.toml", "setup.py", "setup.cfg", "requirements.txt", "Pipfile", "pyrightconfig.json"]
|
|
|
|
|
install-hint = "npm i -g pyright (or: pip install pyright)"
|
|
|
|
|
|
2026-10-28 14:57:34 +08:00
|
|
|
[[language-servers]]
|
|
|
|
|
name = "ty"
|
|
|
|
|
fallback = true
|
|
|
|
|
command = "ty"
|
|
|
|
|
args = ["server"]
|
|
|
|
|
root-markers = ["ty.toml", "pyproject.toml", "setup.py", "setup.cfg", "requirements.txt", "Pipfile"]
|
|
|
|
|
install-hint = "uv tool install ty (or: pip install ty)"
|
|
|
|
|
|
2026-10-22 18:55:10 +08:00
|
|
|
[debugger]
|
|
|
|
|
adapter = "debugpy"
|
|
|
|
|
command = "python3"
|
|
|
|
|
args = ["-m", "debugpy.adapter"]
|
|
|
|
|
install-hint = "pip install debugpy"
|