vim-svelte-plugin icon indicating copy to clipboard operation
vim-svelte-plugin copied to clipboard

postcss sss Sugars

Open stephanedemotte opened this issue 1 year ago • 1 comments

Hello i try to use SugarSS https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/preprocess.md

How can i tell to the plugin to use sass syntax when <script lang="sss" > is used ?

Thank you !

stephanedemotte avatar Aug 12 '24 12:08 stephanedemotte

Hi there, You can add a svelte syntax file svelte.vim with content

syntax region cssSassSvelteStyle fold
      \ start=+<style[^>]*lang="sss"[^>]*>+ 
      \ end=+</style>+ 
      \ keepend contains=@SassSyntax,svelteTag

The location is typically one of these:

  • ~/.vim/syntax/ (Unix-like systems)
  • $HOME/vimfiles/syntax/ (Windows)
  • ~/.config/nvim/syntax/ (Neovim)
image

leafOfTree avatar Aug 14 '24 11:08 leafOfTree