дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 11:15:40 +02:00
fix(editor): Shift+F6 renames the file when no language server covers it (#653)
In files no language server covers (Markdown, .properties, plain text), Shift+F6 only showed a transient "no running language server supports rename" hint at the caret, so the default rename shortcut looked broken. Root cause: when prepare_rename reported no server and the syntax fallback declined, startRename fell through to the error hint. It now hands off to project.rename, which opens the file rename dialog for the active file; a running server that lacks rename keeps its hint. Verified on macOS: Shift+F6 in .md and .properties editors renames the file, symbol rename in TypeScript is unchanged, and Shift+F6 in the project view still renames the selected file. Fixes #651 Co-authored-by: a-rookie-of-C-language <[email protected]>
Цей коміт міститься в:
1 джерело
0c54266d03
коміт
f8d6f9df77
3 files changed
+46
-1
No files matched your search
@@ -46,6 +46,11 @@ export function unavailableText(e: unknown, fallback = "No language server avail
|
||||
return e instanceof IpcError && e.kind === "unavailable" && LACKS_FEATURE.test(e.message) ? e.message : fallback;
|
||||
}
|
||||
|
||||
/** True when `unavailable` means no server is running for the file, rather than a running server lacking the feature. */
|
||||
export function isNoServer(e: unknown): boolean {
|
||||
return e instanceof IpcError && e.kind === "unavailable" && !LACKS_FEATURE.test(e.message);
|
||||
}
|
||||
|
||||
// Ids are shared by every window of the backend and outlive a reload there (a cancel that
|
||||
// arrives before its request began is remembered), so each page starts at a random point.
|
||||
let nextId = 1 + Math.floor(Math.random() * 0x7000_0000);
|
||||
|
||||
Reference in new issue
Заблокувати користувача