LSP 3.18 adds new endpoints that allows the server to provide virtual documents which are read only on the client side, this could possibly be used to serve vendored stubs which are currently cached on disk: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.18/specification/#workspace_textDocumentContent