Himujjal/tree-sitter-svelte

Is it possible to use `<style lang="postcss">`?

rstacruz opened this issue · 5 comments

Thank you so much for this package!

I found that using <style lang="anything-here"> will turn off syntax highlighting in Neovim. When using Tailwind with Svelte, it seems to be recommended to use lang="postcss" to prevent reporting errors about unknown at rules.

Is there any workaround for this?

Without With

image

image

Without lang="postcss", syntax highlighting works, but svelte-language-server reports errors when using Tailwind syntax.

With lang="postcss", syntax highlighting doesn't work.

I have the same issue with <script lang="ts">, any updates on this?

I was just being stupid because the typescript parser was not installed.

@ajuvercr Will fix this on the next update. There is even a PR for this. Sorry everyone. I wasn't active in Github for a while now.

Any updates on this one? It's not working for me as well

@rstacruz @ajuvercr @Quat3rnion @andresestrella @icalvin102 @Frostqui

Simply do :TSInstall scss for postcss to work.

The reason: CSS nesting is not yet stable and I am using scss as the default for scss, less, postcss which supports nesting (at least) and a few other features out of the box.

Please refer to the updated doc: https://github.com/Himujjal/tree-sitter-svelte#for-neovim-peeps