summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-12-10 12:31:03 -0500
committerpommicket <pommicket@gmail.com>2022-12-10 12:31:03 -0500
commitb7cbc84f296024d3a89e4604c1b114e79b4e752e (patch)
tree6e093847a80a30ee93e929c793c7076062454692 /main.c
parenta604ad77ff7ef6a75cccdeb86d1a5608caf7c2a6 (diff)
more lsp
Diffstat (limited to 'main.c')
-rw-r--r--main.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/main.c b/main.c
index 567ac7a..69af788 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,8 @@
/*
+@TODO:
+- rust-analyzer bug reports:
+ - bad json can give "Unexpected error: client exited without proper shutdown sequence"
+ - rust-analyzer should wait until cargo metadata/check is done before sending initialize response
FUTURE FEATURES:
- configurable max buffer size
- better undo chaining (dechain on backspace?)
@@ -92,6 +96,7 @@ static void die(char const *fmt, ...) {
#include "ted.h"
#include "gl.c"
#include "text.c"
+#include "lsp.h"
#include "string32.c"
#include "syntax.c"
@@ -288,10 +293,11 @@ int main(int argc, char **argv) {
PROFILE_TIME(init_start)
PROFILE_TIME(basic_init_start)
+
+ if (0) {
// @TODO TEMPORARY
- {
LSP lsp={0};
- chdir("/p/test-lsp");
+// chdir("/p/test-lsp");
if (!lsp_create(&lsp, "rust-analyzer")) {
printf("lsp_create: %s\n",lsp.error);
exit(1);
@@ -408,6 +414,14 @@ int main(int argc, char **argv) {
}
ted->last_save_time = -1e50;
+
+ // @TODO TEMPORARY
+ ted->test_lsp = calloc(1, sizeof(LSP));
+ if (!lsp_create(ted->test_lsp, "rust-analyzer")) {
+ printf("lsp_create: %s\n",ted->test_lsp->error);
+ exit(1);
+ }
+
// make sure signal handler has access to ted.
error_signal_handler_ted = ted;