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

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

Open
srcrip opened this issue Aug 7, 2021 · 3 comments

Comments

@srcrip
Copy link

srcrip commented Aug 7, 2021

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
Copy link
Author

srcrip commented Aug 7, 2021

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 srcrip closed this as completed Aug 7, 2021
@srcrip
Copy link
Author

srcrip commented Aug 8, 2021

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 srcrip reopened this Aug 8, 2021
@davidroeca
Copy link
Collaborator

@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

sveltejs/language-tools#83
sveltejs/language-tools#106
sveltejs/svelte-preprocess#207

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

2 participants