annotate runtime/syntax/less.vim @ 23715:b6d8d9578375 v8.2.2399

patch 8.2.2399: fold test fails in wide terminal Commit: https://github.com/vim/vim/commit/7cf0c114d690c91ac88c92a1a6f1b1935cb6410f Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 24 12:00:01 2021 +0100 patch 8.2.2399: fold test fails in wide terminal Problem: Fold test fails in wide terminal. Solution: Adjust the test. (Dominique Pelle, closes https://github.com/vim/vim/issues/7731, closes https://github.com/vim/vim/issues/7739)
author Bram Moolenaar <Bram@vim.org>
date Sun, 24 Jan 2021 12:15:04 +0100
parents 17c4178f26ea
children
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
22565
17c4178f26ea Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 6476
diff changeset
5 " Last Change: 2020 Sep 29
6476
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
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 syn case ignore
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 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
16 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
17
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 syn region lessDefinition matchgroup=cssBraces start="{" end="}" contains=TOP
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 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
21 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
22 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
23 syn match lessCssAttribute +\%("\%([^"]\|\\"\)*"\|'\%([^']\|\\'\)*'\|#{[^{}]*}\|[^{};]\)*+ contained contains=@lessCssAttributes,lessVariable,lessFunction,lessInterpolation
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 syn match lessDefault "!default\>" contained
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 " less variables and media queries
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 syn match lessVariable "@[[:alnum:]_-]\+" nextgroup=lessCssAttribute skipwhite
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 syn match lessMedia "@media" nextgroup=lessCssAttribute skipwhite
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 " Less functions
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 syn match lessFunction "\<\%(escape\|e\|unit\)\>(\@=" contained
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 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
33 syn match lessFunction "\<\%(rgb\|rgba\|argb\|argb\|hsl\|hsla\|hsv\|hsva\)\>(\@=" contained
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 syn match lessFunction "\<\%(hue\|saturation\|lightness\|red\|green\|blue\|alpha\|luma\)\>(\@=" contained
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 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
36 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
37
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
38 " Less id class visualization
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
39 syn match lessIdChar "#[[:alnum:]_-]\@=" nextgroup=lessId,lessClassIdCall
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
40 syn match lessId "[[:alnum:]_-]\+" contained
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
41 syn match lessClassIdCall "[[:alnum:]_-]\+()" contained
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43 syn match lessClassChar "\.[[:alnum:]_-]\@=" nextgroup=lessClass,lessClassCall
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
44 syn match lessClass "[[:alnum:]_-]\+" contained
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
45 syn match lessClassCall "[[:alnum:]_-]\+()" contained
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
46
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
47 syn match lessAmpersand "&" contains=lessIdChar,lessClassChar
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
48
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
49 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
50
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
51 syn keyword lessTodo FIXME NOTE TODO OPTIMIZE XXX contained
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
52 syn region lessComment start="^\z(\s*\)//" end="^\%(\z1 \)\@!" contains=lessTodo,@Spell
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
53 syn region lessCssComment start="^\z(\s*\)/\*" end="^\%(\z1 \)\@!" contains=lessTodo,@Spell
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
54 syn match lessEndOfLineComment "//.*" contains=lessComment,lessTodo,@Spell
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
55
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
56 hi def link lessEndOfLineComment lessComment
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
57 hi def link lessCssComment lessComment
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
58 hi def link lessComment Comment
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
59 hi def link lessDefault cssImportant
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
60 hi def link lessVariable Identifier
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
61 hi def link lessFunction PreProc
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
62 hi def link lessTodo Todo
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
63 hi def link lessInclude Include
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
64 hi def link lessIdChar Special
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
65 hi def link lessClassChar Special
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
66 hi def link lessAmpersand Character
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
67 hi def link lessId Identifier
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
68 hi def link lessClass Type
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
69 hi def link lessCssAttribute PreProc
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
70 hi def link lessClassCall Type
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
71 hi def link lessClassIdCall Type
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
72 hi def link lessTagName cssTagName
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
73 hi def link lessDeprecated cssDeprecated
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
74 hi def link lessMedia cssMedia
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
75
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
76 let b:current_syntax = "less"
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
77
11d78e58a487 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
78 " vim:set sw=2: