Feat: add hover boxes and diagnostics from lsp
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user