annotate vendor/vim-syntax/less.vim @ 664:5e62619207a8

[vimrc] Remove custom nav color and remove srcery bg (for transparency)
author nanaya <me@nanaya.pro>
date Fri, 10 Dec 2021 20:38:53 +0900
parents a6bbbee07a3a
children
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
649
a6bbbee07a3a Update syntaxes
nanaya <me@nanaya.pro>
parents: 589
diff changeset
5 " Last Change: 2020 Sep 29
589
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
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
13 syn case ignore
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
14
589
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
15 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
16 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
17
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
18 syn region lessDefinition matchgroup=cssBraces start="{" end="}" contains=TOP
540
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
19
589
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
20 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
21 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
22 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
23 syn match lessCssAttribute +\%("\%([^"]\|\\"\)*"\|'\%([^']\|\\'\)*'\|#{[^{}]*}\|[^{};]\)*+ contained contains=@lessCssAttributes,lessVariable,lessFunction,lessInterpolation
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
24 syn match lessDefault "!default\>" contained
540
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
25
589
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
26 " less variables and media queries
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
27 syn match lessVariable "@[[:alnum:]_-]\+" nextgroup=lessCssAttribute skipwhite
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
28 syn match lessMedia "@media" nextgroup=lessCssAttribute skipwhite
540
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
29
589
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
30 " Less functions
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
31 syn match lessFunction "\<\%(escape\|e\|unit\)\>(\@=" contained
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
32 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
33 syn match lessFunction "\<\%(rgb\|rgba\|argb\|argb\|hsl\|hsla\|hsv\|hsva\)\>(\@=" contained
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
34 syn match lessFunction "\<\%(hue\|saturation\|lightness\|red\|green\|blue\|alpha\|luma\)\>(\@=" contained
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
35 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
36 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
37
589
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
38 " Less id class visualization
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
39 syn match lessIdChar "#[[:alnum:]_-]\@=" nextgroup=lessId,lessClassIdCall
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
40 syn match lessId "[[:alnum:]_-]\+" contained
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
41 syn match lessClassIdCall "[[:alnum:]_-]\+()" contained
540
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
42
589
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
43 syn match lessClassChar "\.[[:alnum:]_-]\@=" nextgroup=lessClass,lessClassCall
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
44 syn match lessClass "[[:alnum:]_-]\+" contained
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
45 syn match lessClassCall "[[:alnum:]_-]\+()" contained
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
46
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
47 syn match lessAmpersand "&" contains=lessIdChar,lessClassChar
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
48
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
49 syn region lessInclude start="@import" end=";\|$" contains=lessComment,cssURL,cssUnicodeEscape,cssMediaType,cssStringQ,cssStringQQ
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
50
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
51 syn keyword lessTodo FIXME NOTE TODO OPTIMIZE XXX contained
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
52 syn region lessComment start="^\z(\s*\)//" end="^\%(\z1 \)\@!" contains=lessTodo,@Spell
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
53 syn region lessCssComment start="^\z(\s*\)/\*" end="^\%(\z1 \)\@!" contains=lessTodo,@Spell
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
54 syn match lessEndOfLineComment "//.*" contains=lessComment,lessTodo,@Spell
540
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
55
589
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
56 hi def link lessEndOfLineComment lessComment
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
57 hi def link lessCssComment lessComment
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
58 hi def link lessComment Comment
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
59 hi def link lessDefault cssImportant
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
60 hi def link lessVariable Identifier
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
61 hi def link lessFunction PreProc
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
62 hi def link lessTodo Todo
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
63 hi def link lessInclude Include
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
64 hi def link lessIdChar Special
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
65 hi def link lessClassChar Special
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
66 hi def link lessAmpersand Character
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
67 hi def link lessId Identifier
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
68 hi def link lessClass Type
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
69 hi def link lessCssAttribute PreProc
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
70 hi def link lessClassCall Type
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
71 hi def link lessClassIdCall Type
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
72 hi def link lessTagName cssTagName
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
73 hi def link lessDeprecated cssDeprecated
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
74 hi def link lessMedia cssMedia
540
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
75
50fd59a959ea Add support for lesscss.
edogawaconan <me@myconan.net>
parents:
diff changeset
76 let b:current_syntax = "less"
589
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
77
7fbadf8bd22e Update vendor
nanaya <me@myconan.net>
parents: 540
diff changeset
78 " vim:set sw=2: