From c1f9dc448a38463e11b2415b069bf498b403c939 Mon Sep 17 00:00:00 2001 From: Phil Hagelberg Date: Mon, 29 Jul 2024 15:13:49 -0700 Subject: [PATCH] Accept textDocument argument in textDocument/didSave handler. According to the spec, the didSave handler takes the same textDocument property as the other textDocument handlers, rather than having uri as a top-level field. https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textSynchronization-side --- src/fennel-ls/handlers.fnl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fennel-ls/handlers.fnl b/src/fennel-ls/handlers.fnl index b23e06a..dabb196 100644 --- a/src/fennel-ls/handlers.fnl +++ b/src/fennel-ls/handlers.fnl @@ -273,7 +273,7 @@ Every time the client sends a message, it gets handled by a function in the corr (send (message.diagnostics file)) (set file.open? true)) -(λ notifications.textDocument/didSave [server _send {: uri}] +(λ notifications.textDocument/didSave [server _send {:textDocument {: uri}}] (when (utils.endswith uri "flsproject.fnl") (config.reload server))