Disable automatic highlighting of current token/word?
Sorry if this has been asked before (I couldn't find it in any issues containing "highlight").
Is it possible to disable automatic highlighting of the current token/word without also disabling match-highlight for explicit selections via "editor.selectionHighlight": false?
Thanks!
- VSCode Version: 1.0.0-insider
- OS Version: Win10

I think editor.selectionHighlight does not stop semantic highlighting, so I don't think we have any option to disable semantic highlighting (from https://github.com/Microsoft/vscode/blob/master/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts#L120)
I think
editor.selectionHighlightdoes not stop semantic highlighting
Right, it shouldn't. But an additional option to disable this would be very welcome.
@alexandrudima any updates?
Seems like an easy feature to add, let me know if there's any interest or if you'd like a pull request for this.
:+1: on a PR. You can add a new editor option and use it in https://github.com/Microsoft/vscode/blob/master/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts#L120 -- that is where we do the call to do semantic word highlighting to language servers.
+1 - I like selected matches to be highlighted, but I would like to be able to disable automatic keyword highlighting.
This is really annoying visually.
Also in most themes there's barely a visual difference between a highlighted word and a selected one.
I agree @PierBover. Please react
on the top post to raise its profile.
@aeschli plz put this on your radar in case you'll be working on WordHighlighter for #12973
any solution to this ?
+1
Added editor.occurrencesHighlight that can be set to false to turn this off. Will be available in tomorrow's insiders build and in the March stable release (i.e. not the one going out in the next few days)
Thank you @alexandrudima !
Having read this discussion a few times I assumed that setting editor.selectionHighlight to true and editor.occurrencesHighlight to false would result in the behavior I need: no automatic selection of a word where the cursor is, and a working selection once I select the whole word. But no, in fact, I don't see how editor.occurrencesHighlight changes anything at all, and editor.selectionHighlight turns highlighting off/on completely.
Still highlighting words automatically when the cursor is:

- VSCode Version: 1.11.0
- OS Version: MacOS 10.12.4
Same for me. I also gather from the discussion above, the same conclusion that leikind came to, but I've just installed the latest update (1.11.1) and setting "editor.occurrencesHighlight": false seems to have no effect at all.
Language: Go VSCode: 1.11.1 OS: Windows 10
I also am experiencing that setting "editor.occurrencesHighlight": false in user settings appears to have no effect on word highlighting in VSCode: 1.11.1.
If the cursor is on a word, all occurrences of that word are still highlighted.
@alexandrudima Since "editor.occurrencesHighlight": false does not have any effect for at least 3 users, shouldn't this ticket be re-opened?
Support for occurrencesHighlight seems to be language and extension dependent. On a freshly installed VSCode 1.11.1 with no extensions, changing editor.occurrencesHighlight: false only had effect for .js files, it didn't change anything for .rb, .sql or .py (i didn't try more file types).
After installing the recommended "Ruby" extension, highlighting occurrences is always disabled for Ruby files, changing the occurrencesHighlight flag doesn't have any effect.
Installing the recommended "Python" and "mssql" extensions didn't change anything for those file types, occurrences are always highlighted.
@sullerandras
I installed the Ruby extension and found out that no matter how I set editor.occurrencesHighlight, words in a Ruby file are never highlighted when the cursor is on a word. Contrary to, say, a plain text file when words are always highlighted no matter how I set editor.occurrencesHighlight.
Thank you for the feedback. For cases where no extension registers a document highlight provider, the selection highlighter compensates and highlights whole words. This can happen for any language where we don't ship with such a document highlight provider (e.g. ruby, sql, python).
I've extracted this to #24426
Updated my vscode to V1.11.2, and still "editor.occurrencesHighlight": false,
is not working to stop highlight semantic symbol occurrence. :(