We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83934ed commit b85c068Copy full SHA for b85c068
crates/pgt_hover/src/hovered_node.rs
@@ -24,6 +24,10 @@ impl HoveredNode {
24
pub(crate) fn get(ctx: &pgt_treesitter::context::TreesitterContext) -> Option<Self> {
25
let node_content = ctx.get_node_under_cursor_content()?;
26
27
+ if looks_like_sql_param(node_content.as_str()) {
28
+ return None;
29
+ }
30
+
31
let under_cursor = ctx.node_under_cursor.as_ref()?;
32
33
match under_cursor.kind() {
@@ -114,3 +118,10 @@ impl HoveredNode {
114
118
}
115
119
116
120
121
122
+fn looks_like_sql_param(content: &str) -> bool {
123
+ (content.starts_with("$") && !content.starts_with("$$"))
124
+ || (content.starts_with(":") && !content.starts_with("::"))
125
+ || (content.starts_with("@"))
126
+ || content.starts_with("?")
127
+}
0 commit comments