mirror of
https://github.com/tpope/vim-haml.git
synced 2025-12-06 09:14:25 +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
|
||||
" 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="$"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user