I followed this tutorial from the visual studio code on how to create a language server to a validate an extension file. I proceeded to make a copy of the lsp-sample project and got it running.
In my analysis of this project, I noticed that only open or changed files in the workspace are validated.
// The content of a text document has changed. This event is emitted
// when the text document first opened or when its content has changed.
documents.onDidChangeContent((change) => {
validateTextDocument(change.document);
});
This is all fine for most cases, but I think that when the workspace is opened all files (regardless of being open by the editor or not) should be validated in order to have a richer IDE experiencie in vscode.
Can anyone experienced in the Language Server protocol help me on how to do this? As far as I know the "documents" object is only populated with opened files.
Many thanks, Ricardo