Add colon classes to HAML syntax

This adds syntax detection for HAML files.

An example would be if using classes provided by [Tailwind CSS][1]

IE:

```html
<div class="flex sm:inline-flex md:block lg:hidden xl:flex ...">
  <!-- ... -->
</div>
```

```haml
.flex.sm:inline-flex.md:block.lg:hidden.xl:flex
  # ...
```

[1]: https://tailwindcss.com/docs/flexbox-display#responsive
This commit is contained in:
Nathaniel Watts
2018-08-18 22:55:09 -05:00
committed by Tim Pope
parent cac9d806f0
commit 98645ebe88

View File

@@ -2,7 +2,7 @@
" Language: Haml
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Filenames: *.haml
" Last Change: 2016 Aug 29
" Last Change: 2018 Aug 21
if exists("b:current_syntax")
finish
@@ -38,7 +38,7 @@ syn match hamlDespacer "[<>]" contained nextgroup=hamlDespacer,hamlSelfCloser,
syn match hamlSelfCloser "/" contained
syn match hamlClassChar "\." contained nextgroup=hamlClass
syn match hamlIdChar "#{\@!" contained nextgroup=hamlId
syn match hamlClass "\%(\w\|-\)\+" contained nextgroup=@hamlComponent
syn match hamlClass "\%(\w\|-\|\:\)\+" contained nextgroup=@hamlComponent
syn match hamlId "\%(\w\|-\)\+" contained nextgroup=@hamlComponent
syn region hamlDocType start="^\s*!!!" end="$"