coc-svelte icon indicating copy to clipboard operation
coc-svelte copied to clipboard

Support the svelte-preprocess template tags + pug/other html preprocessors

Open srcrip opened this issue 4 years ago • 3 comments

This kinda thing is supported in svelte-preprocess:

<template lang="pug">
  main
    h2 Title
    p lorem ipsum
</template>

It currently works in VSCode. But unfortunately not in this extension. Any idea how to make it work?

srcrip avatar Aug 07 '21 12:08 srcrip

If anyones curious, I guess the piece I was missing was just enabling pug with: https://github.com/leafOfTree/vim-svelte-plugin

I'm still having trouble getting it to play nice with eslint though.

srcrip avatar Aug 07 '21 12:08 srcrip

Actually I'm having one other problem directly related to the lang server: I get TS 2304 errors in this scenario:

<template lang="pug">
  main
    h1 Trillium
    section
      h2 Lobby
      pre { lobbyUsers }
      +each('lobbyUsers as user')
        li { user } // <--------------- [ts 2304] [E] Cannot find name 'user'.
</template>

Anyone know how to stop this?

srcrip avatar Aug 08 '21 15:08 srcrip

@sevensidedmarble there are a number of related issues that are likely the cause here. Unfortunately, they are upstream so should be taken to the maintainers of the other repos. Once the fixes are made there, comment back here if updates that resolve the issue have been made and need to be brought back here

https://github.com/sveltejs/language-tools/issues/83 https://github.com/sveltejs/language-tools/issues/106 https://github.com/sveltejs/svelte-preprocess/issues/207

davidroeca avatar Sep 22 '21 19:09 davidroeca