summaryrefslogtreecommitdiff
path: root/lsp.h
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2023-01-08 12:05:34 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2023-01-08 12:05:34 -0500
commitbb6d6850bd7d1e7fb65bae6f4d1bae32534f3455 (patch)
tree74b40c5ec7877043802ebc8b325df8552f002e8e /lsp.h
parent34212b559d7bb0eb0d4e7797ba3e9b1a718cedac (diff)
start windows support
Diffstat (limited to 'lsp.h')
-rw-r--r--lsp.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/lsp.h b/lsp.h
index 1e11180..28ebcd8 100644
--- a/lsp.h
+++ b/lsp.h
@@ -557,10 +557,10 @@ typedef struct LSP {
// has the response to the initialize request been sent?
// thread-safety: this starts out false, and only gets set to true once
// (when the initialize response is received)
- _Atomic bool initialized;
+ bool initialized;
// has the LSP server exited?
- // thread-safety: atomic
- _Atomic bool exited;
+ // thread-safety: this starts out false, and only gets set to true once (when the server exits)
+ bool exited;
// thread-safety: only set once in lsp_create.
char *command;
// this is set in lsp_create, then later set to NULL when we send over the configuration (after the initialized notification).
@@ -628,6 +628,10 @@ LSPDocumentPosition lsp_location_start_position(LSPLocation location);
// get the end of location's range as a LSPDocumentPosition
LSPDocumentPosition lsp_location_end_position(LSPLocation location);
void lsp_free(LSP *lsp);
+// call this to free any global resources used by lsp*.c
+// not strictly necessary, but prevents valgrind errors & stuff.
+// make sure you call lsp_free on every LSP you create before calling this.
+void lsp_quit(void);
#endif // LSP_H_