aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDanielGavin <danielgavin5@hotmail.com>2023-05-06 18:05:54 +0200
committerDanielGavin <danielgavin5@hotmail.com>2023-05-06 18:05:54 +0200
commit7d8d803fcb2b3c92d4d9e5d37ea922c06c90d645 (patch)
treef95d2c888d2bfcb4ed4c9070bbc65ae8cc29a763 /src
parentafde92e33d6b107b8b85218c8529c74b6a7ecaab (diff)
Stub out unknown method used by nvim "window/progress"
Diffstat (limited to 'src')
-rw-r--r--src/odin/printer/printer.odin7
-rw-r--r--src/server/requests.odin11
2 files changed, 17 insertions, 1 deletions
diff --git a/src/odin/printer/printer.odin b/src/odin/printer/printer.odin
index 559522f..d2af255 100644
--- a/src/odin/printer/printer.odin
+++ b/src/odin/printer/printer.odin
@@ -126,7 +126,12 @@ build_disabled_lines_info :: proc(p: ^Printer) {
for group in p.comments {
for comment in group.list {
- comment_text, _ := strings.replace_all(comment.text[:], " ", "", context.temp_allocator)
+ comment_text, _ := strings.replace_all(
+ comment.text[:],
+ " ",
+ "",
+ context.temp_allocator,
+ )
if strings.contains(comment_text, "//odinfmt:disable") {
found_disable = true
diff --git a/src/server/requests.odin b/src/server/requests.odin
index 555ffd3..fca7609 100644
--- a/src/server/requests.odin
+++ b/src/server/requests.odin
@@ -275,6 +275,7 @@ call_map: map[string]proc(
"textDocument/documentLink" = request_document_links,
"textDocument/rename" = request_rename,
"textDocument/references" = request_references,
+ "window/progress" = request_noop,
}
notification_map: map[string]bool = {
@@ -283,6 +284,7 @@ notification_map: map[string]bool = {
"textDocument/didClose" = true,
"textDocument/didSave" = true,
"initialized" = true,
+ "window/progress" = true,
}
consume_requests :: proc(config: ^common.Config, writer: ^Writer) -> bool {
@@ -1381,3 +1383,12 @@ request_references :: proc(
return .None
}
+
+request_noop :: proc(
+ params: json.Value,
+ id: RequestId,
+ config: ^common.Config,
+ writer: ^Writer,
+) -> common.Error {
+ return .None
+}