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
This commit is contained in:
Phil Hagelberg 2024-07-29 15:13:49 -07:00
parent 9cc22e407e
commit c1f9dc448a

View File

@ -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))