coc-extensions / coc-svelte

svelte support for (Neo)Vim
MIT License
176 stars 24 forks source link

SvelteKit syntax results in "Identifier expected" error #33

Closed Theo-Steiner closed 3 years ago

Theo-Steiner commented 3 years ago

Hey, thank you very much for creating this fantastic extension.

The default project template of svelte kit, which will soon be the default template for svelte in general, features new svelte-kit specific syntax, that is not supported in the language-server version used in the newest version of the coc-svelte extension. This is a snippet from the default template:

<ul>
    <li class:active={$page.path === '/about'}>
        <a sveltekit:prefetch href="/about">About</a>
    </li>
</ul>

It results in a "[js 1003] Identifier expected" and a flood of red for the remaining markdown path.

For now, I have forked this repo and published a temporary solution on npm under coc-svelte-kit I will also make a pull request, so that coc-svelte works for svelte-kit projects as well.

iamcco commented 3 years ago

closes by https://github.com/coc-extensions/coc-svelte/pull/34