Skip to content

Quick info (Ctrl+G I, gi) shows what the name under the caret is - #595

Open
a-team-app[bot] wants to merge 3 commits into
mainfrom
milestone-591-quick-info
Open

a-team-app[bot] wants to merge 3 commits into
mainfrom
milestone-591-quick-info

Conversation

@a-team-app

@a-team-app a-team-app Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Quick info (Ctrl+G I, gi, Go › Quick info, right after Go to definition) asks the file's language server what the name under the caret is and shows it in a box just under the line, or above it near the bottom of the editor: the signature coloured with the file's grammar, then the doc comment wrapped.

  • Esc closes it and leaves the caret where it was. Enter closes it and goes to the definition, as gd does. ↑ ↓ PgUp PgDn scroll a long answer. Any other key closes it and goes on to the editor, so typing x inserts x.
  • Its buttons sit on its bottom border, Enter Go to definition and Esc Close, and clicking one does what its key does. F1 while it's open lists its keys and leaves it open.
  • With no answer it says Nothing to show here. While the server is loading or missing it says so exactly as gd does, and the menu item is dimmed until the server is ready. If you press it twice quickly, only the second answer shows.

Closes #591

Choices beyond the task

  • The buttons are right-aligned, with the main action first (Enter Go to definition, then Esc Close). The style guide's dialog rule puts them in that order, where the pitch mockup had them on the left and the other way round.
  • On a narrow editor the button labels get shorter: first Enter Definition, then just Enter and Esc, so the buttons never overflow the box.
  • Prose wraps at 80 columns, or as wide as the signature if that's wider. Otherwise a long doc comment would stretch the box across a wide editor.
  • Markdown is only partly cleaned up. Rules (---), backslash escapes and the backticks around inline code are removed. Everything else shows as written.
  • A click, a scroll or a terminal resize that moves the caret closes the box, since it would no longer point at the name.

Notes for review

  • I tried it with csharp-ls in a real terminal through tuirec: the box shows below the line and above it near the bottom; Esc, typing, →, Enter, both button clicks and F1 all work; and at 58 and 70 columns the box still fits and draws cleanly. I didn't try it with a Python or TypeScript server, because none is installed here. The parser covers every hover shape those servers send (MarkedString, arrays of them, MarkupContent), and the tests cover each one.
  • IInputScopeStack gains Top. LayeredScope gains an optional callback for keys it passes on. The chat's code colouring moved into CodeBlockColours so the box can share it.

a-team try tuicode 595

🤖 Generated with Claude Code

a-team-app Bot and others added 2 commits October 23, 2026 22:33
Asks the file's language server for textDocument/hover and shows the
answer in a box under the caret's line, or above it when there's more
room there: the signature coloured with its grammar, then the doc comment
wrapped. LspHover reads every shape the protocol allows.

The box never takes focus. Its keys are a LayeredScope over whatever had
them, so Esc, Enter and the scroll keys are its own, and any other key
closes it and carries on to the editor. A click, scroll or resize that
moves the caret's cell closes it on the next iteration. The scope stack
gains Top so the host can tell whether the box's scope is the one
receiving keys before popping it.

The code-row colouring the chat used is now CodeBlockColours, shared by
both.

Closes #591

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Closes #591

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Keep the QuickInfo command ids; main dropped the DefinitionPicker ones (#596).

Closes #591

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

Quick info (Ctrl+G I, gi) shows what the name under the cursor is, in a box under the line

0 participants