aaaaargZombies / webcomponent-template-editor.nvim

access html / css language features while editing template strings in webcomponents
MIT License
1 stars 0 forks source link

Changing the return type in typescript / Lit breaks treesitter capture #2

Closed aaaaargZombies closed 1 month ago

aaaaargZombies commented 1 month ago

No return type specified, works as expect. But this code breaks the capture.

    const remoteDataSwitch = (rd: RemoteData): TemplateResult => {
      switch (rd.kind) {
        case 'Loading':
          return html`<p>LOADING STATE</p>`;
        case 'NotAsked':
          return html`<p>NOT_ASKED STATE</p>`;
        case 'Success':
          return html`<p>SUCCESS STATE</p>
            <p>
              <code>${rd.result.getChannelData(0).length}</code>
            </p>`;
        case 'Failure':
          return html`<p>FAILURE STATE</p>`;
      }

Though it seems to work in treesitter playground, which I now see is archived? could be a potential issue.

2024-05-28-11:36:52-screenshot