Skip to content

Commit a836f91

Browse files
committed
chore: docs for hover
1 parent 6b42cf5 commit a836f91

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

crates/pg_hover/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
//! # pg_hover
2+
//!
3+
//! This crate implements the hover feature. Essentially, it takes a position in a sql statement, and checks what node is located at that position. If the node is a valid hover result type, it resolves the type from the schema cache and returns it. The consumer of this crate is responsible for rendering the data.
4+
//!
5+
//! Note that we have two ways of resolving the hover result. We first try to resolve it from the enriched AST, and if that fails, we try to resolve it from the tree-sitter CST. This is because the enriched AST is more accurate, but the tree-sitter CST is more reliable.
6+
17
mod resolve;
28

39
use pg_schema_cache::SchemaCache;

0 commit comments

Comments
 (0)