Open wenfangdu opened 1 year ago
I believe that the syntax highlighting comes from whether you have that language extension installed. Is there syntax highlighting when you open a .vue
or .cjs
file?
@andreamah .vue
highlighting requires an extension and I've installed it, .cjs
highlighting is built-in and doesn't require extensions, both are highlighted when you open them but are not highlighted in the search editor.
Just checked, and it looks like syntax highlighting is dictated using a fixed set of mappings. I could probably add cjs
since it's built-in but we only support built-in languages for syntax highlighting for this; sorry about that!
@andreamah You mean even if I installed the syntax highlighting extension for .vue
files, they still won't work in the search editor? That seems like a bug.
You can create a feature request to support non-default syntax highlighting for the search editor and we can put it as a backlog candidate to see whether enough people would want to see it.
Unfortunately, using a fixed list is intentional, as the grammar for the search editor cannot be dynamically changed based on which extensions are installed. We would need to do a fairly large restructuring (integrate search editor highlighting into core) to get this working.
@andreamah Feature request opened here: https://github.com/microsoft/vscode/issues/185717
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce:
.js
file has syntax highlighting: