vetur icon indicating copy to clipboard operation
vetur copied to clipboard

Syntax highlighting not working with lang="scss"

Open LMS007 opened this issue 2 years ago • 5 comments

Info

  • Platform: Mac
  • Vetur version: v35
  • VS Code version: 1.64

Problem

SCSS is causing syntax highlight errors. I can only guess that it think this should be css, but it looks like it should be supports according to docs

I have also disabled all other plugins.

.vue file Screen Shot 2022-02-04 at 10 44 52 AM

LMS007 avatar Feb 04 '22 18:02 LMS007

Need a semi colon -> color: red;

jiverson avatar Feb 07 '22 13:02 jiverson

Sorry, bad example, here is a better one

Screen Shot 2022-02-07 at 8 43 27 AM

Screen Shot 2022-02-07 at 8 45 39 AM

LMS007 avatar Feb 07 '22 16:02 LMS007

Today, for reasons I don't fully understand, the highlight started working! I suspect my issues may have come from other plugins affecting this one, but I honestly have no idea. I'll close this ticket for now and if I learn anything else, I will reopen with more details.

LMS007 avatar Feb 08 '22 22:02 LMS007

~Update: ESlint was part of the problem, when that plugin is enabled, it causes errors in scss scopes. When its disabled, I don't have any issues, but none of my js files are working.~

~So I dont know if this issue is with Ventr or with ESLint, but I'd like to run both plugins at the same time unless there is another solution?~

I further tracked this down to simply not working after restarted vscode after install vetur.

  1. Uninstall Vetur
  2. Disable all plugins
  3. Install Vetur
  4. Notice that scss works in vue files
  5. Restart vscode
  6. Notice that scss no longer works in vue files

vet2

LMS007 avatar Feb 11 '22 19:02 LMS007

Do you try to use <style lang="scss" scoped> ?

yoyo930021 avatar Nov 01 '22 10:11 yoyo930021