Conversation
…gnature docs Several related improvements to the LSP code-hint UI, matching VS Code/WebStorm: - Annotate auto-import completions with their source module (labelDetails. description), dimmed and right-aligned, so same-named items from different modules read as distinct rows instead of confusing duplicates. Advertise completionItem.labelDetailsSupport. - When several modules export the same name, collapse the auto-imports into a single "N imports…" row. Accepting it re-opens the list filtered to just that name's sources (reusing the existing list's positioning, keyboard nav, doc popups and import insertion); picking one inserts the symbol and its import. - Lead the side doc popup with the item's signature (token.detail) as a highlighted code block, and show the popup whenever there's a signature OR documentation — so a doc-less item still shows its signature instead of nothing.
…uage The signature block in the completion doc popup was hard-wired to ```typescript. The LSP `detail` string carries no language tag, so derive the highlight language from the active editor instead. The JS family maps to ts/tsx because vtsls emits TypeScript-syntax signatures even in .js/.jsx (TS is a superset); every other language uses its own id, and _highlightCode no-ops gracefully for ids hljs doesn't know.
The popup defined its own ::-webkit-scrollbar (9px wide, 5px-radius block thumb with no padding), which read chunkier than the rest of the app. Drop it so the popup inherits the app-wide scrollbar (brackets_scrollbars.less) - the same 12px slim, rounded pill thumb the editor uses.
The LSP parameter-hint popup rendered "((tableName: any)" - a doubled, unbalanced
paren and no function name. requestParameterHints dropped the signature label and
activeSignature, so the provider couldn't supply the function name; the manager
then fell back to editor.getToken() at the caret, which is the just-typed "(".
- LSPClient: pass the full signature label and activeSignature through.
- DefaultProviders: use the active signature (not all overloads merged into one
param list) and derive the function name from its label.
- ParameterHintsManager: use the provider-supplied functionName when present,
falling back to the editor token only when absent (preserves Tern behavior).
Now renders e.g. "getTableIndexes(tableName: any)" - named and balanced.
Clicking an empty part of the editor's scrollbar track now jumps straight to that proportional position, instead of the browser default of paging one viewport at a time - which is painfully slow to reach a far-off spot in a large file. A click on the thumb is left to the native drag. Logic lives in a new EditorHelper/ScrollbarHelper.js (installClickToJump), wired from the Editor constructor so it applies to every editor, including inline ones. Works on both the vertical and horizontal scrollbars.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Several related improvements to the LSP code-hint UI, matching VS Code/WebStorm:
Annotate auto-import completions with their source module (labelDetails. description), dimmed and right-aligned, so same-named items from different modules read as distinct rows instead of confusing duplicates. Advertise completionItem.labelDetailsSupport.
When several modules export the same name, collapse the auto-imports into a single "N imports…" row. Accepting it re-opens the list filtered to just that name's sources (reusing the existing list's positioning, keyboard nav, doc popups and import insertion); picking one inserts the symbol and its import.
Lead the side doc popup with the item's signature (token.detail) as a highlighted code block, and show the popup whenever there's a signature OR documentation — so a doc-less item still shows its signature instead of nothing.