#include "node.h"
#include <tree_sitter/api.h>

extern pthread_mutex_t lsp_mutex;

void word_highlighter(Node *node);
void tree_sitter_highlighter(Node *buffer);
void collect_tree_highlights(BufferData *e, TSNode node, char *src,
                             Fold *prev_folds, int prev_fold_count);
void append_highlight(Line *lh, size_t start_col, size_t end_col, Color *fg,
                      Color *bg, uint8_t flags);
void append_highlight_byte(Line *line, size_t start_col, size_t end_col,
                           Color *fg, Color *bg, uint8_t flags);
void highlight_node(BufferData *e, TSNode current);
