Pure-D / serve-d

D LSP server (dlang language server protocol server)
MIT License
206 stars 48 forks source link

Specify SaveOptions in server capabilities #320

Closed tarkah closed 1 year ago

tarkah commented 1 year ago

textDocument/didSave is specified by the server capability of SaveOptions or bool in the TextDocumentSyncOptions. Since this wasn't getting set, some clients may not send textDocument/didSave since the server never broadcasted this capability.

includeText is set to false since I didn't see anywhere we use the text contents when responding to this method.

I've confirmed this fixes a bug in the client helix as dub build lints weren't getting triggered since it wouldn't send the textDocument/didSave message unless this capability was sent.

Relevant docs: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_didSave

Related issue on Helix side: https://github.com/helix-editor/helix/pull/3957

WebFreak001 commented 1 year ago

my bad on the test case failures, although I'm not sure why it's trying to download new versions when I include a dub.selections.json. Will investigate in master