You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does the LSP protocol support parsing certain regions of a file, e.g. to parse JavaScript/CSS within an HTML file? Or is there some mechanism for passing the actual code of a file instead of the URI? (Which would enable the technique of replacing other regions with whitespace and parsing the whole file with different language servers, as VS Code seems to do.)
This was addressed in #505 but wasn't really answered except to mark as out-of-scope -- but VS Code must be achieving the functionality somehow, so I'm wondering how it works. The LSP spec only seems to mention passing URIs, and doesn't mention much about different schemes e.g. data: URIs, but it also seems unlikely that VS Code is writing a temp file to disk to achieve this functionality.
The text was updated successfully, but these errors were encountered:
Does the LSP protocol support parsing certain regions of a file, e.g. to parse JavaScript/CSS within an HTML file? Or is there some mechanism for passing the actual code of a file instead of the URI?
The client includes the content of the file in the textDocument/didOpen notification so it could technically lie to the server by simply including what's inside the <script> tag to the JavaScript language engine and the other other stuff to the HTML language server.
I will close the issue as a question. I think LSP should not promote a model how to do this. I think both using forwards or embedded services is a valid solution.
Does the LSP protocol support parsing certain regions of a file, e.g. to parse JavaScript/CSS within an HTML file? Or is there some mechanism for passing the actual code of a file instead of the URI? (Which would enable the technique of replacing other regions with whitespace and parsing the whole file with different language servers, as VS Code seems to do.)
This was addressed in #505 but wasn't really answered except to mark as out-of-scope -- but VS Code must be achieving the functionality somehow, so I'm wondering how it works. The LSP spec only seems to mention passing URIs, and doesn't mention much about different schemes e.g. data: URIs, but it also seems unlikely that VS Code is writing a temp file to disk to achieve this functionality.
The text was updated successfully, but these errors were encountered: