-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
Fallback to word highlighting when contributions don't provide document highlights #12973
Comments
Word highlight is broken in CSHTML. Not sure if this should be the normal word highlight or whether this is a language word highlighter. |
I see word highlighting is broken for HTML, CSHTML and HandleBars Since, HTML has been extracted into a separate language server and this functionality has been lost. Moving to October. This has to be documented as limitation in release notes |
The html extension registers a document highlighter provider. This seems to prevent the default word highlighting. The same seems to happen in TypeScript: Select a word in a comment does not highlight it. Handing over to @jrieken. |
It seems like that was done on purpose by @alexandrudima - see: https://github.com/Microsoft/vscode/blob/master/src/vs/editor/contrib/find/common/findController.ts#L814 Waiting for him to comment |
IMO this must be fixed. It's a regression for the HTML mode which no longer shows word highlighting for anything but tags (which are served by a document highlight symbol provider). |
Not really sure what you mean @aeschli. Yes, we have no more nested modes and lost smart highlight for embedded languages, the rest is driven by the word def, or by the implementation your extension provides. |
I verified that my word regex is now correct. As you observed in your comment above (https://github.com/Microsoft/vscode/blob/master/src/vs/editor/contrib/find/common/findController.ts#L814), word highlighting is skipped if there is a highlight provider. |
Yes, this must be fixed by the DocumentHighlightProvider aka the HTML extension. The principle is very simple: if there is a semantic highlighter, do not do a stupid word highlight if the selection is collapsed. If there is a real selection, then the selection highlighter kicks in. @aeschli The same was happening before, the html worker used to have code in place to fall back to word highlighting. |
@alexandrudima So I'd reimplement what the default (aka stupid) word highlighter does in the html extension. And if there's another extension that adds a smarter highlighter provider that also has some highlighting for the words I don't support, that will conflict with the 'stupid' ones the HTML extension would provide. |
@aeschli Please do as you wish, as far as I'm concerned you are free to take ownership of |
It was a behaviour change, but we haven't had many complaints about it since then. |
Closing as there have been no complaints about the new behaviour. |
Regarding test plan item #12100
Steps to Reproduce:
example-word-count.cshtml
file https://github.com/Microsoft/vscode-website/tree/3cfa8213681f680418997c7671fa1b8c452ac2afupdateWordCount
pictured below on line 79 and note that it doesn't match the symbol with a highlight like it does in Stable today as shown in the picture.Left is Insiders. Right is Stable.
![screen shot 2016-09-28 at 10 48 18 pm](https://cloud.githubusercontent.com/assets/11839736/18942458/113a46aa-85ce-11e6-93b1-f95d7c3c8a33.png)
The text was updated successfully, but these errors were encountered: