corneliusio / svelte-sublime

💡Sublime Text syntax highlighting for Svelte components
MIT License
58 stars 6 forks source link

Support pug highlighting #9

Closed haritonasty closed 4 years ago

haritonasty commented 4 years ago

Now whole code in pug templates not highlighted:

...
</script>

<template lang="pug">
include /ui/mixins

+if('hasTrigger')
  p(bind:this='{anc}')

slot(name='trigger')

+if('open')
  .bg(bind:this='{dialog}', on:click='{onClickaway}')
    +panel.dialog(variant='context')
      .top
        h2 {title}
        +icon('close')(on:click='{closeDialog}')
      slot(name='content')
</template>

<style>
...
corneliusio commented 4 years ago

Have considered this quite a bit and I just don't think it's in the scope of this package. It's tricky because while Svelte technically doesn't care what templating language use you, it does assume basic HTML and is ultimately it's own templating language that implements a superset of HTML itself. Supporting completely separate templating language would require essentially cramming an entirely new package into this one, and would also mean I'd be expected to support other templating languages as well.

Anyone is absolutely welcome to take this package and create a new Pug version, but it's not something I have the margins to commit to long-term and currently only intend to commit to Sveltes official templating language.

haritonasty commented 4 years ago

@corneliusio got you, thanks for answer!

duduindo commented 3 years ago

@corneliusio 😢