дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 19:25:54 +02:00
fix(lsp): Name the running server when it lacks a feature (#201)
ide-lsp returned the same `unavailable` error whether no server was running or a running server didn't implement the request, so the UI said no language server was available, and Invoke Inline Completion said no language server provides inline completion, while jdtls was running fine (it doesn't implement textDocument/inlineCompletion). When servers are running but none supports the feature, the error now names them ("jdtls doesn't support inline completion"), and every explicit action shares one message helper: Invoke Inline Completion, go to declaration / implementation / type declaration, quick documentation, parameter info, rename, reformat, intention actions, highlight usages, call / type hierarchy, find usages, safe delete and workspace symbols. With no server running it still says no language server is available. Background requests while typing stay silent.
Fixes #186
Claude-Session: https://claude.ai/code/session_01Dq6jQQn8ZhRfkkyj3PRutA
Цей коміт міститься в:
1 джерело
4410da60a2
коміт
c8e3fe9d2e
10 files changed
+148
-14
No files matched your search
@@ -3,7 +3,7 @@ import type { EditorView } from "@codemirror/view";
|
||||
import { activeEditor, editorsFor } from "@/editor/api";
|
||||
import { isVirtualUri, virtualDocument } from "@/platform/virtualDocs";
|
||||
import { executeAction } from "@/platform/actions";
|
||||
import { IpcError, call, commands, isCancelled, isTauri } from "@/platform/ipc";
|
||||
import { IpcError, call, commands, isCancelled, isTauri, unavailableText } from "@/platform/ipc";
|
||||
import type { IdeError } from "@/bindings";
|
||||
import { maybeEditorService, notifications } from "@/workbench/contributions";
|
||||
|
||||
@@ -36,7 +36,7 @@ export function hint(text: string, tone: "info" | "warning" | "error" = "info")
|
||||
export function reportError(e: unknown) {
|
||||
if (isCancelled(e)) return;
|
||||
hint(
|
||||
isUnavailable(e) ? "No language server available" : e instanceof Error ? e.message : String(e),
|
||||
isUnavailable(e) ? unavailableText(e) : e instanceof Error ? e.message : String(e),
|
||||
isUnavailable(e) ? "info" : "error",
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Заблокувати користувача