Skip to main content

Crate dsl_hover

Crate dsl_hover 

Source
Expand description

Rich SQL hover.

Resolution order (first match wins):

  1. Column declaration when cursor sits on the column NAME inside a CREATE TABLE in the current buffer.
  2. Constraint / index / trigger identifier (pk_/fk_/idx_/…) – catalog lookup or fallback convention card.
  3. Catalog table / column / DB function.
  4. Multi-word SQL keyword (sliding window).
  5. Single-word knowledge entry (keyword / type / built-in function).

Modules§

constraint_id
Hover for constraint / index / trigger identifiers.
ddl
Lookups against the current buffer’s CREATE TABLE statements.
implicit
Derive implicit column specs that the user did not type but the DB still applies.
md_table
ASCII tables for hover output, with single-row separators so the markdown renderer can colour-style the grid uniformly.
render
Markdown renderers for hover bodies.
resolver
Pick the right hover renderer for the token / word run under the cursor.
token
Locate the identifier or word run at the cursor.

Enums§

KeywordCase
How keywords are cased in synthesized DDL fragments shown in hover.

Functions§

current_keyword_case
hover
hover_with
Like hover but applies the caller’s preferred keyword casing to every synthesised DDL fragment.
hover_with_parsed
Like hover_with but takes an already-parsed file, so a caller that maintains a per-document parse cache (dsl-server’s ParseCache) can skip re-parsing the whole buffer on every hover request. hover_with itself parses fresh and delegates here.