unified-language-server
unified-language-server copied to clipboard
Smarter file processing
Initial checklist
- [X] I read the support docs
- [X] I read the contributing guide
- [X] I agree to follow the code of conduct
- [X] I searched issues and couldn’t find anything (or linked relevant results below)
Problem
workspace/didChangeWatchedFiles means a file or folder changed. https://microsoft.github.io/language-server-protocol/specifications/specification-current/#workspace_didChangeWatchedFiles. Instead of reprocessing every markdown file (https://github.com/unifiedjs/unified-language-server/blob/f222a6552e04c50c4bf6933b0539898ece9c47ff/lib/index.js#L264).
Solution
perhaps we should use cheap hashes to ensure we only perform work when something changed.
Alternatives
n/a
Problem
workspace/didChangeWatchedFilesmeans a file or folder changed. https://microsoft.github.io/language-server-protocol/specifications/specification-current/#workspace_didChangeWatchedFiles. Instead of reprocessing every markdown file
This doesn’t mean a file has changed. It means a watched file has changed.
How this is used can be seen in remark-vscode: https://github.com/remarkjs/vscode-remark/blob/2f1cb9916651e1cb19ede823f2bf0ffdb3aa8af8/src/extension.js#L27-L32
So if a configuration file changes, all documents are checked again.
That is an important caveat that seems like it’s something that should be in a comment next to the function?
Maybe in the readme for workspace/didChangeWatchedFiles add somethink like:
Clients are expected to watch the remark configuration files.
I’m okay on that too, but probably also perhaps a new section (Client?) on how to make a client (because Use should be one basic example, and API should be just about options)
I think that’s basically what the Language Server features section is.
It is the items in that list, and could be that section, but the current wording is different than what I’m looking for. That section currently explains what the code is doing.
I’m looking for a list that explains what requests and notifications, must/should/could be sent, and when, by clients. And a list of things that are sent by the server back to the client, and how the client should respond to that.
Hi! This was closed. Team: If this was fixed, please add phase/solved. Otherwise, please add one of the no/* labels.