mirror of
https://github.com/tpope/vim-haml.git
synced 2025-12-06 17:24:24 +08:00
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:
committed by
Tim Pope
parent
cac9d806f0
commit
98645ebe88
@@ -2,7 +2,7 @@
|
|||||||
" Language: Haml
|
" Language: Haml
|
||||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||||
" Filenames: *.haml
|
" Filenames: *.haml
|
||||||
" Last Change: 2016 Aug 29
|
" Last Change: 2018 Aug 21
|
||||||
|
|
||||||
if exists("b:current_syntax")
|
if exists("b:current_syntax")
|
||||||
finish
|
finish
|
||||||
@@ -38,7 +38,7 @@ syn match hamlDespacer "[<>]" contained nextgroup=hamlDespacer,hamlSelfCloser,
|
|||||||
syn match hamlSelfCloser "/" contained
|
syn match hamlSelfCloser "/" contained
|
||||||
syn match hamlClassChar "\." contained nextgroup=hamlClass
|
syn match hamlClassChar "\." contained nextgroup=hamlClass
|
||||||
syn match hamlIdChar "#{\@!" contained nextgroup=hamlId
|
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 match hamlId "\%(\w\|-\)\+" contained nextgroup=@hamlComponent
|
||||||
syn region hamlDocType start="^\s*!!!" end="$"
|
syn region hamlDocType start="^\s*!!!" end="$"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user