-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Only have valid Html content in Virtual Html document #14286
Comments
Two ways we could approach this:
Got any opinions on this? |
We'd still need to have a semi-pull model in cases when the server hasn't finished parsing the document and therefore hasn't pushed down classified spans yet. That's what this issue covers. As of right now if you're typing C# completions there are times when the server will fall behind slightly and you'll get mismatched completions; same would occur for Html.
I think we can mix this and the previous one to come up with a good solution. In the end it'd function a lot like the synchronization of the C# buffer today. Basically, as a user types we'll be calculating HTML documents and refreshing them on the client as results become ready; however, once a user-action occurs we'll ensure our documents are synchronized (but with blanked out spaces) and then perform that user-action. |
Hmm, since attributes shouldn't matter in regards to Curious how well that would work; would be damn fast too. |
@NTaylorMullen The TextMate grammar idea is a very good one, though on investigation it might be rather CPU-intensive. VS Code itself doesn't appear to expose any API to observe the built-in textmate tokenization, or even the generated colors. There is a command So if we do want to evaluate the TextMate scopes, the recommended approach appears to be using the |
Ahh, awesome investigation. Ya that seems like an issue. I thought they'd have better perf results than that given the regex is responsible for all of the coloring. |
Right now if you have the following in your Razor file:
And you try invoking completion on the
<str
you get no completion. This is something that could definitely be fixed on the Html language service side but should also be addressed by us. This is the first issue I noticed by duplicating the Razor content in the Html buffer but it'd be wise of us to replace all C# content in the HTML buffer with spaces to avoid any further issues.The text was updated successfully, but these errors were encountered: