Repository navigation
feat(hover): show the resolved overload and column - #868
Merged
Merged
Conversation
Hover resolves the statement at the cursor with the catalog the analyser sees and shows the function overload, column, or relation the hovered name resolves to. CTE and subquery columns show their inferred type. Without a unique reference, hover falls back to the name lookups. Hover now uses the innermost statement, so it also works inside SQL function bodies.
psteinroe
added this pull request to stack #869
October 18, 2026 08:04
psteinroe
removed this pull request from stack #869
October 18, 2026 15:19
Base automatically changed from
refactor/catalog-references
to
feat/inlay-hints
October 18, 2026 15:19
Collaborator
Author
|
Folded into #861 (now one PR for inlay hints, resolved references and hover). GitHub shows this as merged into |
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.
Hover now uses the name resolver from #867. Before, it looked names up in the snapshot, so an overloaded function listed every overload and columns were guessed by name.
Before / after
Before, hover showed both functions:
Now it shows only the overload that
pick(1)resolves to:How
walk_statementsis a new workspace helper, extracted frompull_inlay_hintsand shared with it. It walks the file like the analyser, with theCatalogandSessionfollowing the statements. Hover uses it to resolve the innermost statement at the cursor withcollect_references, and passes the references whose span contains the cursor topgls_hover(new fieldOnHoverParams::references).pgls_hovermaps a reference of the hovered kind to the snapshot object:c.label,text - CTE column).CREATE FUNCTIONwas used and the body was just a string literal to tree-sitter.Risks