annotate runtime/syntax/less.vim @ 19646:847a300aa244

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