razor
razor copied to clipboard
Variable highlighting is not properly updated when writing
Version used: VS 2022 v17.3 Preview 2
To reproduce:
- Create blazor server app
- Go to any component
- in
@code
section in any method start writing a local wariable - During writing do a little break
- Continue writing without moving cursor with mouse
Expected behavior:
- Highlighting is updated when I write the variable
- When I leave the variable declaration node, highlighting is gone
Actual behavior: None of the expected.
Demo:
@gundermanc Does this look like a potential editor bug to you?
@gundermanc Does this look like a potential editor bug to you?
It looks like it could be either editor or a language service issue. It looks like the VS LSP client re-requests highlights any time the caret is explicitly moved via mouse click OR the user edits the text, so at first glance we should handle this case in the feature itself.
Another possibility is a text synchronization issue. If the C# buffer isn't changing, we can't extend the highlight.
@allisonchou if you have a repro it may help to check for any 1) 1st chance exceptions under the debugger from LSP client? 2) anything in the LSP request/response logs that could indicate what is wrong.
@gundermanc Does this look like a potential editor bug to you?
It looks like it could be either editor or a language service issue. It looks like the VS LSP client re-requests highlights any time the caret is explicitly moved via mouse click OR the user edits the text, so at first glance we should handle this case in the feature itself.
Another possibility is a text synchronization issue. If the C# buffer isn't changing, we can't extend the highlight.
@allisonchou if you have a repro it may help to check for any 1) 1st chance exceptions under the debugger from LSP client? 2) anything in the LSP request/response logs that could indicate what is wrong.
Isn't this that the tags from the highlight request aren't being expanded to fill the current word?