-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LSP: Unknown method textDocument/didSave #36464
Comments
@tophattom This sounds like the same issue I reported in the Vim plugin here: natebosch/vim-lsc#164 My understanding is that LSP clients should not send export interface TextDocumentSyncOptions {
/**
* Save notifications are sent to the server.
*/
save?: SaveOptions;
} It's not clear which Sublime LSP plugin you're using, but I think this should be raised there. I'll also open an issue against the LSP spec asking for clarification of this, since it's the second time I've seen it - I don't think the spec is as clear as it could be whichever way it should be. |
Oh, I see. Thanks! I'll open an issue in https://github.com/tomv564/lsp then. |
@tophattom Great - feel free to CC me in the issue or post the link back here. I've opened microsoft/language-server-protocol#713 to try and have the spec made clearer (there is a table at microsoft/language-server-protocol#288 (comment) which matches my understanding, it's just not as clear from the spec). I'll close this for now since I don't think there's anything for us to do, but we can revisit if that turns out to be incorrect. Thanks! |
@tophattom Btw, if you've managed to get this all working well, it might be worth having some notes shared somewhere (for ex. we have Vim instructions linked at https://github.com/dart-lang/sdk/blob/master/pkg/analysis_server/tool/lsp_spec/README.md#using-the-dart-lsp-server-in-editors). There was also a request for Sublime Flutter support, so the author of flutter/flutter#29915 might be interested to know what you had to do to set it up (I posted some notes from managing to get it somewhat-working, but I'm not a Sublime so I'm not sure what I did was a good way to do it). |
Actually, I just copied your configuration from that thread. This didSave error was so annoying that I had to disable the server for now so didn't get to play around with it that much. Seemed to work fine, though. But I'll try to write more instructions if I ever figure more stuff out! |
Ah 😁 Unfortunately there's no quick fix for the Hopefully it'll be sorted properly in the client soon. Do shout if you hit any other issues that might be related to the server though :-) |
When using the analysis server in LSP mode together with Sublime Text LSP plugin I get an error
Unknown method textDocument/didSave
every time I save a file.The text was updated successfully, but these errors were encountered: