language-tools
language-tools copied to clipboard
how to highlight svelte code in VScode search result ?
Describe the problem
how can you highlight this code ?
Describe the proposed solution
what setting to turn on ?
Importance
nice to have
How do I get to this search screen, i.e. what are the steps to reproduce this?
How do I get to this search screen, i.e. what are the steps to reproduce this?
Can't test right now but I think when you search you get an option to open the search in a tab
@dummdidumm got to keyboard shortcut and do this
It seems that VSCode only calculates the highlight with the part of the text in the search result. It's kind of like the highlight for a Markdown code block. Except in the majority of the time, the code block only contains an insufficient part of the code to accurately highlight. So even if we add the support, it'll only work if your search result contains the start tag of the script tag. The HTML part might work better than the script tag, but it's still going to be half-baked. So I kind of think it's not worth the effort to be honest.
For Svelte files it seems fully non-functional; you can increase the number of shown lines around the hit in the upper right and even if relevant context is available, there is no highlighting.
Yeah. That's why I said "even if we add the support". I didn't know you could adjust the line count. That at least provides a workaround for it to highlight more correctly.