Feat: add hover boxes and diagnostics from lsp

This commit is contained in:
2025-12-29 15:56:51 +00:00
parent 6108f78be3
commit c7068d33d7
31 changed files with 1782 additions and 183 deletions

View File

@@ -11,6 +11,15 @@ extern std::unordered_map<std::string, pcre2_code *> regex_cache;
TSQuery *load_query(const char *query_path, TSSetBase *set);
void ts_collect_spans(Editor *editor);
bool ts_predicate(TSQuery *query, const TSQueryMatch &match,
std::function<std::string(const TSNode *)> subject_fn);
void clear_regex_cache();
template <typename T>
inline T *safe_get(std::map<uint16_t, T> &m, uint16_t key) {
auto it = m.find(key);
if (it == m.end())
return nullptr;
return &it->second;
}
#endif