13

I'm using VS Code in combination with clasp to develop in Google Apps Script.

Using scriptlets inside a <script> or <style> tag is messing with VS Codes syntax highlighting:

editor snippet

Also I regularly get html-language-server errors.

Is there a way around that?

A setting maybe to teach VS Code that it is fine what I do?

tehhowch
  • 9,645
  • 4
  • 24
  • 42
an d re
  • 153
  • 2
  • 6

1 Answers1

1

Google's HTML templating language does not conform to proper HTML syntax, so VSCode will flag these scriptlets as errors when working in HTML mode.

Fortunately, this template syntax is very similar to PHP, so changing your editor's language mode to PHP should remove most, if not all, errors.

Adam Stevenson
  • 657
  • 3
  • 11