Mercurial > vim
annotate runtime/syntax/mason.vim @ 29662:b03c47618895 v9.0.0171
patch 9.0.0171: quickfix line highlight is overruled by 'cursorline'
Commit: https://github.com/vim/vim/commit/6e5c61119a07b513a99baa9618e8182a74fd7e24
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Aug 8 16:03:06 2022 +0100
patch 9.0.0171: quickfix line highlight is overruled by 'cursorline'
Problem: Quickfix line highlight is overruled by 'cursorline'.
Solution: Reverse the combination of attributes. (closes https://github.com/vim/vim/issues/10654)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 08 Aug 2022 17:15:03 +0200 |
parents | d1fe80fb35e6 |
children |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
29150 | 2 " Language: Mason (Perl embedded in HTML) |
3 " Maintainer: vim-perl <vim-perl@googlegroups.com> | |
4 " Homepage: https://github.com/vim-perl/vim-perl | |
5 " Bugs/requests: https://github.com/vim-perl/vim-perl/issues | |
6 " License: Vim License (see :help license) | |
7 " Last Change: 2021 Oct 10 | |
8 " Contributors: Hinrik Örn Sigurðsson <hinrik.sig@gmail.com> | |
9 " Andrew Smith <andrewdsmith@yahoo.com> | |
7 | 10 " |
12499 | 11 " TODO: |
7 | 12 " - Fix <%text> blocks to show HTML tags but ignore Mason tags. |
13 " | |
14 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
15 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
16 if exists("b:current_syntax") |
7 | 17 finish |
18 endif | |
19 | |
20 " The HTML syntax file included below uses this variable. | |
21 " | |
22 if !exists("main_syntax") | |
23 let main_syntax = 'mason' | |
24 endif | |
25 | |
26 " First pull in the HTML syntax. | |
27 " | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
28 runtime! syntax/html.vim |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
29 unlet b:current_syntax |
7 | 30 |
31 syn cluster htmlPreproc add=@masonTop | |
32 | |
33 " Now pull in the Perl syntax. | |
34 " | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
35 syn include @perlTop syntax/perl.vim |
12499 | 36 unlet b:current_syntax |
37 syn include @podTop syntax/pod.vim | |
7 | 38 |
39 " It's hard to reduce down to the correct sub-set of Perl to highlight in some | |
40 " of these cases so I've taken the safe option of just using perlTop in all of | |
41 " them. If you have any suggestions, please let me know. | |
42 " | |
12499 | 43 syn region masonPod start="^=[a-z]" end="^=cut" keepend contained contains=@podTop |
44 syn cluster perlTop remove=perlBraces | |
45 syn region masonLine matchgroup=Delimiter start="^%" end="$" keepend contains=@perlTop | |
46 syn region masonPerlComment start="#" end="\%(%>\)\@=\|$" contained contains=perlTodo,@Spell | |
47 syn region masonExpr matchgroup=Delimiter start="<%" end="%>" contains=@perlTop,masonPerlComment | |
48 syn region masonPerl matchgroup=Delimiter start="<%perl>" end="</%perl>" contains=masonPod,@perlTop | |
49 syn region masonComp keepend matchgroup=Delimiter start="<&\s*\%([-._/[:alnum:]]\+:\)\?[-._/[:alnum:]]*" end="&>" contains=@perlTop | |
50 syn region masonComp keepend matchgroup=Delimiter skipnl start="<&|\s*\%([-._/[:alnum:]]\+:\)\?[-._/[:alnum:]]*" end="&>" contains=@perlTop nextgroup=masonCompContent | |
51 syn region masonCompContent matchgroup=Delimiter start="" end="</&>" contained contains=@masonTop | |
7 | 52 |
12499 | 53 syn region masonArgs matchgroup=Delimiter start="<%args>" end="</%args>" contains=masonPod,@perlTop |
7 | 54 |
12499 | 55 syn region masonInit matchgroup=Delimiter start="<%init>" end="</%init>" contains=masonPod,@perlTop |
56 syn region masonCleanup matchgroup=Delimiter start="<%cleanup>" end="</%cleanup>" contains=masonPod,@perlTop | |
57 syn region masonOnce matchgroup=Delimiter start="<%once>" end="</%once>" contains=masonPod,@perlTop | |
58 syn region masonClass matchgroup=Delimiter start="<%class>" end="</%class>" contains=masonPod,@perlTop | |
59 syn region masonShared matchgroup=Delimiter start="<%shared>" end="</%shared>" contains=masonPod,@perlTop | |
7 | 60 |
12499 | 61 syn region masonDef matchgroup=Delimiter start="<%def\s*[-._/[:alnum:]]\+\s*>" end="</%def>" contains=@htmlTop |
62 syn region masonMethod matchgroup=Delimiter start="<%method\s*[-._/[:alnum:]]\+\s*>" end="</%method>" contains=@htmlTop | |
7 | 63 |
12499 | 64 syn region masonFlags matchgroup=Delimiter start="<%flags>" end="</%flags>" contains=masonPod,@perlTop |
65 syn region masonAttr matchgroup=Delimiter start="<%attr>" end="</%attr>" contains=masonPod,@perlTop | |
7 | 66 |
12499 | 67 syn region masonFilter matchgroup=Delimiter start="<%filter>" end="</%filter>" contains=masonPod,@perlTop |
7 | 68 |
69 syn region masonDoc matchgroup=Delimiter start="<%doc>" end="</%doc>" | |
70 syn region masonText matchgroup=Delimiter start="<%text>" end="</%text>" | |
71 | |
72 syn cluster masonTop contains=masonLine,masonExpr,masonPerl,masonComp,masonArgs,masonInit,masonCleanup,masonOnce,masonShared,masonDef,masonMethod,masonFlags,masonAttr,masonFilter,masonDoc,masonText | |
73 | |
74 " Set up default highlighting. Almost all of this is done in the included | |
75 " syntax files. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
76 hi def link masonDoc Comment |
12499 | 77 hi def link masonPod Comment |
29150 | 78 hi def link podOrdinary masonPod |
12499 | 79 hi def link masonPerlComment perlComment |
7 | 80 |
81 let b:current_syntax = "mason" | |
82 | |
83 if main_syntax == 'mason' | |
84 unlet main_syntax | |
85 endif |