дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 19:25:54 +02:00
feat(python): add ruff language server for lint, format and organize imports (#859)
In projects configured for Ruff (ruff.toml, .ruff.toml, or pyproject.toml with a [tool.ruff] table), ruff server runs next to basedpyright as a managed pip tool: its lint diagnostics, Reformat Code / format on save, Optimize Imports and Code Cleanup's fix-all. It is listed after the type checkers, so hover, navigation and rename stay with them; projects without a Ruff configuration never start or install it. Root markers accept file#table to require a TOML table, and a hand-defined server named ruff now only overrides how the built-in one launches. Verified with the real-servers end-to-end test against ruff and basedpyright. Co-authored-by: andreabasile <[email protected]>
Цей коміт міститься в:
1 джерело
e584f044d7
коміт
a623e5d385
10 files changed
+184
-12
No files matched your search
@@ -553,7 +553,7 @@ export function NewServerDialog({
|
||||
const [commandLine, setCommandLine] = useState("");
|
||||
const [name, setName] = useState<string | null>(null);
|
||||
const [languages, setLanguages] = useState<string[]>([]);
|
||||
// "ruff server": the executable, then its arguments.
|
||||
// "pylyzer --server": the executable, then its arguments.
|
||||
let words: string[] = [];
|
||||
let quoteError: string | null = null;
|
||||
try {
|
||||
@@ -600,7 +600,7 @@ export function NewServerDialog({
|
||||
autoFocus
|
||||
className={styles.grow}
|
||||
value={commandLine}
|
||||
placeholder="ruff server"
|
||||
placeholder="pylyzer --server"
|
||||
onChange={(e) => setCommandLine(e.target.value)}
|
||||
/>
|
||||
<IconButton
|
||||
|
||||
@@ -216,8 +216,8 @@ const UNTRANSLATED = new Set<string>([
|
||||
"NAME=value; OTHER=value",
|
||||
"node_modules/typescript",
|
||||
"PascalCase",
|
||||
"pylyzer --server",
|
||||
"pyproject.toml, .git",
|
||||
"ruff server",
|
||||
"run pytest",
|
||||
"snake_case",
|
||||
"tests",
|
||||
|
||||
Reference in new issue
Заблокувати користувача