Skip to content

Say when a language has no server instead of just doing less - #78

Merged
Seungpyo1007 merged 1 commit into
developfrom
feature/lsp-missing-hint
Aug 10, 2026
Merged

Say when a language has no server instead of just doing less#78
Seungpyo1007 merged 1 commit into
developfrom
feature/lsp-missing-hint

Conversation

@Seungpyo1007

Copy link
Copy Markdown
Member

From the 0.4.0 plan §7 — "attach more language servers". Reading the code first changed what the work was.

They were already attached

rust, go, c, cpp, shell, lua and java are all in lspRegistry.cjs and activate automatically when the binary is on PATH. Nothing needed adding.

What was actually missing

The registry only kept servers it found. So when gopls is not installed, a Go file gets syntax highlighting and nothing else — no diagnostics, no go-to-definition, no symbols — and the app never says why. It reads as the app simply being weak at Go.

There was no way to say otherwise: to report that something is missing you have to know it could exist.

The catalog now holds every server this app knows about, installed or not, with the command and how to install it. Opening a file of such a language says so once:

go 은(는) 언어 서버가 없어 하이라이트만 됩니다. gopls 를 설치하면 정의·진단·심볼이 켜집니다 — go install golang.org/x/tools/gopls@latest

Once per language, and only when a file of that language is actually opened. TypeScript is deliberately never reported as missing — Monaco's worker handles it, so saying otherwise would be false.

The decision logic is in src/engine/lspHint.ts as pure functions (11 tests), including that an unknown language is never reported.

Also

registry() runs where/which once per language synchronously, and whoever asked first paid for all of it — which turned out to be the first file open. It is now built shortly after startup instead.

Verification

Real app, on a machine with neither gopls nor rust-analyzer, 5/5: opening main.go gives the notice with the install command; app.ts stays silent; lib.rs gets its own notice; reopening main.go says nothing.

1102 unit tests passing. npm run typecheck and npm run build clean.

A probe mistake worth noting: it clicked the src folder before each file, toggling it collapsed, so most file clicks silently did nothing and the run looked like the notice never fired. Expanding once fixed the probe — the app had been correct from the first run.

rust·go·c·cpp·shell·lua·java 는 이미 등록돼 있었음. PATH 에 바이너리 있으면
자동으로 켜짐. 문제는 반대쪽 — 없을 때 아무 말도 안 함.

gopls 없으면 Go 파일은 하이라이트만 되고 정의·진단·심볼이 전부 조용히 없다.
앱이 원래 그 정도인 줄 알기 딱 좋음. 레지스트리가 설치된 것만 들고 있어서
없다고 말할 재료도 없었음.

아는 서버 전부를 catalog 로 들고, 그 언어 파일 처음 열 때 한 번 알림.
설치 명령도 같이. TypeScript 는 Monaco 워커가 맡으니까 없다고 안 함.

registry() 가 where 를 언어 수만큼 동기로 도는데 그걸 처음 물어보는 쪽이
다 치르고 있었음. 앱 뜬 직후 미리 짓게 함.
@Seungpyo1007 Seungpyo1007 added this to the v0.3 (2026-09-30) milestone Aug 10, 2026
@Seungpyo1007 Seungpyo1007 added the enhancement New feature or request label Aug 10, 2026
@Seungpyo1007 Seungpyo1007 self-assigned this Aug 10, 2026
@Seungpyo1007
Seungpyo1007 merged commit 2a5baab into develop Aug 10, 2026
1 check passed
@Seungpyo1007
Seungpyo1007 deleted the feature/lsp-missing-hint branch August 10, 2026 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant