MCPcopy Create free account
hub / github.com/AmrDeveloper/GQL / hint

Method hint

src/gitql/gitql_line_editor.rs:79–94  ·  view source on GitHub ↗
(&self, buffer: &mut StyledBuffer)

Source from the content-addressed store, hash-verified

77
78impl Hinter for GitQLHinter {
79 fn hint(&self, buffer: &mut StyledBuffer) -> Option<StyledBuffer> {
80 if let Some(keyword) = buffer.last_alphabetic_keyword() {
81 let keyword_lower = keyword.to_lowercase();
82 for word in GITQL_RESERVED_KEYWORDS {
83 if word.starts_with(&keyword_lower) {
84 let hint = &word[keyword.len()..];
85 let mut styled_buffer = StyledBuffer::default();
86 let mut style = Style::default();
87 style.set_foreground_color(Color::DarkGrey);
88 styled_buffer.insert_styled_string(hint, style);
89 return Some(styled_buffer);
90 }
91 }
92 }
93 None
94 }
95}
96
97pub struct FixedCompleter;

Callers

nothing calls this directly

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected