Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lit-html.tags does not control syntax highlighting #31

Open
dbatiste opened this issue Mar 7, 2019 · 4 comments
Open

lit-html.tags does not control syntax highlighting #31

dbatiste opened this issue Mar 7, 2019 · 4 comments

Comments

@dbatiste
Copy link

dbatiste commented Mar 7, 2019

Trying to get syntax highlighting in css template strings in VS Code using extension. I've tried adding the following to settings.json but it doesn't seem to have any effect. I feel like I must be doing something incorrect... but then again, maybe not?

settings.json:

"lit-html.tags": [
    "html",
    "css"
]

for example, when using css template strings:

import { css } from 'lit-element/lit-element.js';

export const colors = css`
    :host {
        display: block;
        color: blue;
    }
    :host([hidden]) {
        display: none;
    }
`;
@joakimbeng
Copy link

Same issue here...
I have a function with the name h and want its content to be syntax highlighted as html, my settings.json looks like:

"lit-html.tags": [
    "html",
    "h"
]

But e.g. h`<element attr="val"/>` does not get any syntax highlight. If I rename it to "html" its content instantly is colored... I've tried reinstalling and reloading VS Code multiple times with no luck.

@mjbvz
Copy link
Contributor

mjbvz commented Mar 20, 2019

lit-html.tags currently only controls intellisense, not highlighting. VS Code does not support dynamically generate grammars for syntax highlighting

@mjbvz mjbvz changed the title lit-html.tags not working lit-html.tags does not control syntax highlighting Mar 20, 2019
@gavinbarron
Copy link

Would it be possible to support dynamic syntax highlighting via the new Semantic Token Provider? https://github.com/microsoft/vscode-docs/blob/main/api/language-extensions/syntax-highlight-guide.md#tokenization

Curious as I just ran into the highlighting limitation.

@mpajer-gti
Copy link

lit-html.tags currently only controls intellisense, not highlighting. VS Code does not support dynamically generate grammars for syntax highlighting

lit-html.tags is not working,
not even setting lit-html.format.enabled as false is working.
For some reason this plugin only uses config that was set in defaultConfiguration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants