annotate vendor/vim-syntax/less.vim @ 620:7ac088ee101a

Add typescript vim syntax
author nanaya <me@nanaya.pro>
date Tue, 30 Oct 2018 19:04:56 +0900
parents 7fbadf8bd22e
children a6bbbee07a3a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
589
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
1 " Vim syntax file
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
2 " Language: less
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
3 " Maintainer: Alessandro Vioni <jenoma@gmail.com>
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
4 " URL: https://github.com/genoma/vim-less
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
5 " Last Change: 2014 November 24
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
6
540
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
7 if exists("b:current_syntax")
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
8 finish
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
9 endif
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
10
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
11 runtime! syntax/css.vim
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
12 runtime! after/syntax/css.vim
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
13
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
14 syn case ignore
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
15
589
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
16 syn cluster lessCssProperties contains=cssFontProp,cssFontDescriptorProp,cssColorProp,cssTextProp,cssBoxProp,cssGeneratedContentProp,cssPagingProp,cssUIProp,cssRenderProp,cssAuralProp,cssTableProp
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
17 syn cluster lessCssAttributes contains=css.*Attr,lessEndOfLineComment,lessComment,cssValue.*,cssColor,cssURL,lessDefault,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssRenderProp
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
18
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
19 syn region lessDefinition matchgroup=cssBraces start="{" end="}" contains=TOP
540
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
20
589
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
21 syn match lessProperty "\%([{};]\s*\|^\)\@<=\%([[:alnum:]-]\|#{[^{}]*}\)\+\s*:" contains=css.*Prop skipwhite nextgroup=lessCssAttribute contained containedin=lessDefinition
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
22 syn match lessProperty "^\s*\zs\s\%(\%([[:alnum:]-]\|#{[^{}]*}\)\+\s*:\|:[[:alnum:]-]\+\)"hs=s+1 contains=css.*Prop skipwhite nextgroup=lessCssAttribute
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
23 syn match lessProperty "^\s*\zs\s\%(:\=[[:alnum:]-]\+\s*=\)"hs=s+1 contains=css.*Prop skipwhite nextgroup=lessCssAttribute
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
24 syn match lessCssAttribute +\%("\%([^"]\|\\"\)*"\|'\%([^']\|\\'\)*'\|#{[^{}]*}\|[^{};]\)*+ contained contains=@lessCssAttributes,lessVariable,lessFunction,lessInterpolation
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
25 syn match lessDefault "!default\>" contained
540
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
26
589
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
27 " less variables and media queries
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
28 syn match lessVariable "@[[:alnum:]_-]\+" nextgroup=lessCssAttribute skipwhite
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
29 syn match lessMedia "@media" nextgroup=lessCssAttribute skipwhite
540
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
30
589
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
31 " Less functions
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
32 syn match lessFunction "\<\%(escape\|e\|unit\)\>(\@=" contained
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
33 syn match lessFunction "\<\%(ceil\|floor\|percentage\|round\|sqrt\|abs\|sin\|asin\|cos\|acos\|tan\|atan\|pi\|pow\|min\|max\)\>(\@=" contained
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
34 syn match lessFunction "\<\%(rgb\|rgba\|argb\|argb\|hsl\|hsla\|hsv\|hsva\)\>(\@=" contained
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
35 syn match lessFunction "\<\%(hue\|saturation\|lightness\|red\|green\|blue\|alpha\|luma\)\>(\@=" contained
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
36 syn match lessFunction "\<\%(saturate\|desaturate\|lighten\|darken\|fadein\|fadeout\|fade\|spin\|mix\|greyscale\|contrast\)\>(\@=" contained
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
37 syn match lessFunction "\<\%(multiply\|screen\|overlay\|softlight\|hardlight\|difference\|exclusion\|average\|negation\)\>(\@=" contained
540
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
38
589
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
39 " Less id class visualization
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
40 syn match lessIdChar "#[[:alnum:]_-]\@=" nextgroup=lessId,lessClassIdCall
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
41 syn match lessId "[[:alnum:]_-]\+" contained
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
42 syn match lessClassIdCall "[[:alnum:]_-]\+()" contained
540
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
43
589
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
44 syn match lessClassChar "\.[[:alnum:]_-]\@=" nextgroup=lessClass,lessClassCall
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
45 syn match lessClass "[[:alnum:]_-]\+" contained
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
46 syn match lessClassCall "[[:alnum:]_-]\+()" contained
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
47
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
48 syn match lessAmpersand "&" contains=lessIdChar,lessClassChar
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
49
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
50 syn region lessInclude start="@import" end=";\|$" contains=lessComment,cssURL,cssUnicodeEscape,cssMediaType,cssStringQ,cssStringQQ
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
51
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
52 syn keyword lessTodo FIXME NOTE TODO OPTIMIZE XXX contained
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
53 syn region lessComment start="^\z(\s*\)//" end="^\%(\z1 \)\@!" contains=lessTodo,@Spell
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
54 syn region lessCssComment start="^\z(\s*\)/\*" end="^\%(\z1 \)\@!" contains=lessTodo,@Spell
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
55 syn match lessEndOfLineComment "//.*" contains=lessComment,lessTodo,@Spell
540
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
56
589
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
57 hi def link lessEndOfLineComment lessComment
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
58 hi def link lessCssComment lessComment
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
59 hi def link lessComment Comment
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
60 hi def link lessDefault cssImportant
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
61 hi def link lessVariable Identifier
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
62 hi def link lessFunction PreProc
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
63 hi def link lessTodo Todo
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
64 hi def link lessInclude Include
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
65 hi def link lessIdChar Special
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
66 hi def link lessClassChar Special
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
67 hi def link lessAmpersand Character
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
68 hi def link lessId Identifier
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
69 hi def link lessClass Type
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
70 hi def link lessCssAttribute PreProc
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
71 hi def link lessClassCall Type
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
72 hi def link lessClassIdCall Type
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
73 hi def link lessTagName cssTagName
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
74 hi def link lessDeprecated cssDeprecated
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
75 hi def link lessMedia cssMedia
540
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
76
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
77 let b:current_syntax = "less"
589
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
78
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
79 " vim:set sw=2: