summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-12-28 13:29:01 -0500
committerpommicket <pommicket@gmail.com>2022-12-28 13:29:01 -0500
commitf57b21c5a6ac9913e3b9727abfed951708917250 (patch)
treeb3bfd84139c9d79abd51bcb74adaf0d50966e15e
parentd6b2cc80723ce6e8454449bcdcdcb495f7a08ad9 (diff)
moving things around a bit
-rw-r--r--lsp-parse.c1
-rw-r--r--main.c5
-rw-r--r--ted.c5
-rw-r--r--ted.h4
-rw-r--r--test/lsp/JavaA/Main.java1
5 files changed, 7 insertions, 9 deletions
diff --git a/lsp-parse.c b/lsp-parse.c
index 828c672..703bc51 100644
--- a/lsp-parse.c
+++ b/lsp-parse.c
@@ -301,6 +301,7 @@ static bool parse_completion(LSP *lsp, const JSON *json, LSPResponse *response)
static bool parse_signature_help(LSP *lsp, const JSON *json, LSPResponse *response) {
JSONObject result = json_force_object(json_get(json, "result"));
+ json_debug_print_object(json, result);printf("\n");
LSPResponseSignatureHelp *help = &response->data.signature_help;
u32 active_signature = 0;
diff --git a/main.c b/main.c
index cca34ee..4cad511 100644
--- a/main.c
+++ b/main.c
@@ -1,8 +1,5 @@
/*
@TODO:
-Unrecognized request method: language/status
-Unrecognized request method: client/registerCapability
-Unrecognized request method: workspace/executeClientCommand
- why is jdtls not giving us signatures?
- why is clangd not giving us active parameter?
- more LSP stuff:
@@ -12,7 +9,7 @@ Unrecognized request method: workspace/executeClientCommand
- find usages
- go through signature help capabilities
- JSON syntax highlighting
-- separate signature-help setting (dont use trigger-characters)
+- separate signature-help setting
- check if there are any other non-optional/nice-to-have-support-for server-to-client requests
- better non-error window/showMessage(Request)
- document lsp.h and lsp.c.
diff --git a/ted.c b/ted.c
index 222932f..6fd2906 100644
--- a/ted.c
+++ b/ted.c
@@ -1,8 +1,3 @@
-void menu_open(Ted *ted, Menu menu);
-void menu_close(Ted *ted);
-void find_update(Ted *ted, bool force);
-Command command_from_str(char const *str);
-
// this is a macro so we get -Wformat warnings
#define ted_seterr(ted, ...) \
snprintf((ted)->error, sizeof (ted)->error - 1, __VA_ARGS__)
diff --git a/ted.h b/ted.h
index 21d3bf5..8952e76 100644
--- a/ted.h
+++ b/ted.h
@@ -557,6 +557,7 @@ typedef struct Ted {
void autocomplete_close(Ted *ted);
void signature_help_retrigger(Ted *ted);
char *buffer_contents_utf8_alloc(TextBuffer *buffer);
+Command command_from_str(char const *str);
void command_execute(Ted *ted, Command c, i64 argument);
void ted_switch_to_buffer(Ted *ted, TextBuffer *buffer);
// the settings of the active buffer, or the default settings if there is no active buffer
@@ -585,3 +586,6 @@ void config_read(Ted *ted, ConfigPart **parts, const char *filename);
void config_parse(Ted *ted, ConfigPart **parts);
void config_free(Ted *ted);
char *settings_get_root_dir(Settings *settings, const char *path);
+void menu_open(Ted *ted, Menu menu);
+void menu_close(Ted *ted);
+void find_update(Ted *ted, bool force);
diff --git a/test/lsp/JavaA/Main.java b/test/lsp/JavaA/Main.java
index 2792b7c..5682de5 100644
--- a/test/lsp/JavaA/Main.java
+++ b/test/lsp/JavaA/Main.java
@@ -3,6 +3,7 @@ public class Main {
int x = 0;
x++;
for (int i = 0; i < args.length; ++i) {
+ Integer.parseInt("33");
}
}
}