ide-css icon indicating copy to clipboard operation
ide-css copied to clipboard

Linting Inside of a JS String

Open dannyfritz opened this issue 8 years ago • 3 comments

ide-css lets me modify the scopes it can operate in. Is there a way to get it to operate within a template literal of JS? The syntax highlighting already works, just need to know if there is a scope I can tell ide-css to look at to make this work. atom_2017-10-04_14-49-42

dannyfritz avatar Oct 04 '17 20:10 dannyfritz

@dannyfritz

TL;DR; Currently ide-css CAN NOT do css linting (or other parsing) in file of JS-grammar because it operates according to ONLY the Root Scope of the file.


To get more info you may do Editor: Log Cursor Scope command with cursor on css codes; you will see list of scopes starting from root scope (grammar of the file) to children scopes.

ide-css cares ONLY about root scope while syntax highlighting cares about different children scopes line by line.

liuderchi avatar Oct 06 '17 03:10 liuderchi

My understanding is that this is currently a limitation of vscode-css-languageserver-bin. Is that correct?

dannyfritz avatar Oct 06 '17 15:10 dannyfritz

My understanding is that this is currently a limitation of vscode-css-languageserver-bin. Is that correct?

Yes. Vscode-css-languageserver-bin parses WHOLE file with only css syntax knowledge. IMO this feature may be an extension for javascript-typescript-langserver

liuderchi avatar Oct 07 '17 15:10 liuderchi