#pragma once

#include "../../protocol/protocol.hpp"

extern "C" {
#include <tree_sitter/api.h>
}

namespace lsp::service::utils::text_coordinates
{
    protocol::uinteger ToOffset(const protocol::Position& position, const protocol::string& content);
    TSPoint ToPoint(const protocol::Position& position);
    TSPoint CalculateEndPoint(const protocol::string& text, TSPoint start);
}
