microsoft / typescript-lit-html-plugin

TypeScript server plugin that adds intellisense for lit-html template strings
MIT License
255 stars 22 forks source link

IntelliSense support for CustomElements #32

Closed Nachasic closed 5 years ago

Nachasic commented 5 years ago

It would be wicked cool to have intelliSense support for custom elements defined in the code:

import { LitElement, html,  property, customElement } from 'lit-element';

@customElement('my-element')
class MyElement extends LitElement {
    @property({ type: String }) public foo: string;

    render () {
        return html`<span>${this.foo}</span>`
    }
}

const markup = html`
    <!-- Here intelliSense picks up definition for my-element and suggests to use it with attribute foo >
`
Nachasic commented 5 years ago

Nevermind, quick research indicated that this is out of this plugin's scope — building completions is in VSCode language service's domain. Found a VSCode extension that does exactly what's needed