mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-06 08:07:49 +00:00
feat(python): support Ruff formatting and config directories (#1573)
Ruff is now an external formatter for Python next to the Ruff language server: Settings › Languages & Frameworks › Ruff has the executable path, a configuration directory (or file), the provider preference, enabled languages, run-on-save, and Reformat with Ruff. Formatting runs on the unsaved document through stdin (with Ruff's --range for selections, in 1-based code-point columns) and never writes the file first. The configuration directory is shared with Ruff LSP, which can then start without a root marker. Tools that can't format a language are rejected even when requested. Co-authored-by: muutot <92625353+muutot@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
muutot
Claude Opus 5.5
parent
f35026f31c
commit
a275239138
@@ -1,5 +1,6 @@
|
||||
id = "python"
|
||||
name = "Python"
|
||||
formatter = { tool = "ruff", parser = "python", range = true }
|
||||
extensions = ["py", "pyi", "pyw"]
|
||||
filenames = ["SConstruct", "SConscript"]
|
||||
first-line = "^#!.*\\bpython[0-9.]*\\b"
|
||||
|
||||
Reference in New Issue
Block a user