Skip to content

fix: emit signature-help parameter labels as UTF-16 offset ranges#142

Merged
pfitzseb merged 1 commit into
mainfrom
sp/signature-param-offset-labels
Jul 15, 2026
Merged

fix: emit signature-help parameter labels as UTF-16 offset ranges#142
pfitzseb merged 1 commit into
mainfrom
sp/signature-param-offset-labels

Conversation

@pfitzseb

Copy link
Copy Markdown
Member

Unnamed method arguments (e.g. get(::Base.EnvDict, k, def)) were labeled with the internal #unused# placeholder, which violates the LSP requirement that a ParameterInformation.label be a substring of the signature label. Emit [start, end) UTF-16 offset ranges instead, computed positionally from the rendered signature so they stay unambiguous even for identically-rendered parameters.

Fixes julia-vscode/LanguageServer.jl#1357.

Unnamed method arguments (e.g. `get(::Base.EnvDict, k, def)`) were
labeled with the internal `#unused#` placeholder, which violates the LSP
requirement that a `ParameterInformation.label` be a substring of the
signature label. Emit `[start, end)` UTF-16 offset ranges instead,
computed positionally from the rendered signature so they stay
unambiguous even for identically-rendered parameters.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@pfitzseb pfitzseb merged commit 8fdd3d5 into main Jul 15, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Julia LSP returns a wrong data structure considering the LSP specification

1 participant