summaryrefslogtreecommitdiff
path: root/lsp.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-03-03 18:01:34 -0500
committerpommicket <pommicket@gmail.com>2023-03-03 18:01:34 -0500
commitfb342182983ffdb0aae0497f5cbcb71b0b291023 (patch)
tree31fdc46c095fb7fe2d8f8f0d21f1d3a310fc1afc /lsp.h
parentfb342637d3b2553daf4659967f35e8e26bd26eb1 (diff)
different read/write colors for ide-highlights
Diffstat (limited to 'lsp.h')
-rw-r--r--lsp.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lsp.h b/lsp.h
index 2ebcce4..2f1720d 100644
--- a/lsp.h
+++ b/lsp.h
@@ -623,7 +623,12 @@ void lsp_document_changed(LSP *lsp, const char *document, LSPDocumentChangeEvent
bool lsp_covers_path(LSP *lsp, const char *path);
// get next message from server
bool lsp_next_message(LSP *lsp, LSPMessage *message);
+/// returns `-1` if `a` comes before `b`, 0 if `a` and `b` are equal, and `1` if `a` comes after `b`
+int lsp_position_cmp(LSPPosition a, LSPPosition b);
+/// returns `true` if `a` and `b` are equal
bool lsp_position_eq(LSPPosition a, LSPPosition b);
+/// returns `true` if `a` and `b` overlap
+bool lsp_ranges_overlap(LSPRange a, LSPRange b);
bool lsp_document_position_eq(LSPDocumentPosition a, LSPDocumentPosition b);
// get the start of location's range as a LSPDocumentPosition
LSPDocumentPosition lsp_location_start_position(LSPLocation location);