.config/nvim/after/syntax/perl/custom.vim

Thu, 02 Mar 2023 21:15:29 -0600

author
Meredith Howard <mhoward@roomag.org>
date
Thu, 02 Mar 2023 21:15:29 -0600
changeset 1058
c8754b0414b9
parent 1029
9265f8508e4c
permissions
-rw-r--r--

add bundled languages to avoid errors

1029
9265f8508e4c Copy other ft and plugin settings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
1 " this keeps indents from jumping more than one level
9265f8508e4c Copy other ft and plugin settings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
2 let b:indent_use_syntax = 0
9265f8508e4c Copy other ft and plugin settings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
3
9265f8508e4c Copy other ft and plugin settings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
4 syn sync minlines=1500
9265f8508e4c Copy other ft and plugin settings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
5
9265f8508e4c Copy other ft and plugin settings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
6 " Weird behavior in sql heredocs
9265f8508e4c Copy other ft and plugin settings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
7 syn clear sqlFold
9265f8508e4c Copy other ft and plugin settings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
8
9265f8508e4c Copy other ft and plugin settings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
9 " fix highlight-all-pragma for vN.NN
9265f8508e4c Copy other ft and plugin settings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
10 syn match perlStatementInclude "\<\%(use\|no\)\s\+v\(\d\|.\)\+"
9265f8508e4c Copy other ft and plugin settings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
11
9265f8508e4c Copy other ft and plugin settings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
12 " Add match for =method and =func from Pod::Weaver
9265f8508e4c Copy other ft and plugin settings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
13 syn match podCommand "^=method" contained nextgroup=podCmdText contains=@NoSpell
9265f8508e4c Copy other ft and plugin settings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
14 syn match podCommand "^=func" contained nextgroup=podCmdText contains=@NoSpell
9265f8508e4c Copy other ft and plugin settings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
15
9265f8508e4c Copy other ft and plugin settings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
16 " Add matches for contrib/function-parameters.vim, but don't apply to fat-arrow cases
9265f8508e4c Copy other ft and plugin settings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
17 syn match perlFunction +\<method\>\(\_s*=>\)\@!\_s*+ nextgroup=perlSubName
9265f8508e4c Copy other ft and plugin settings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
18 syn match perlFunction +\<fun\>\(\_s*=>\)\@!\_s*+ nextgroup=perlSubName
9265f8508e4c Copy other ft and plugin settings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
19
9265f8508e4c Copy other ft and plugin settings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
20 " Tweak some colors, making POD stand out less
9265f8508e4c Copy other ft and plugin settings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
21 hi! def link perlPOD Comment
9265f8508e4c Copy other ft and plugin settings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
22 hi! def link podOrdinary Comment
9265f8508e4c Copy other ft and plugin settings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
23 hi! def link podCommand SpecialComment
9265f8508e4c Copy other ft and plugin settings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
24 hi! def link podCmdText Question
9265f8508e4c Copy other ft and plugin settings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
25 hi! def link podFormat StorageClass
9265f8508e4c Copy other ft and plugin settings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
26
9265f8508e4c Copy other ft and plugin settings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
27 syntax region perlHereDocSQL matchgroup=perlStringStartEnd start=+<<\~\s*'\z(\%(END_\)\=SQL\)'+ end='^\s*\z1$' contains=@SQL
9265f8508e4c Copy other ft and plugin settings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
28 syntax region perlHereDocSQL matchgroup=perlStringStartEnd start='<<\~\s*"\z(\%(END_\)\=SQL\)"' end='^\s*\z1$' contains=@perlInterpDQ,@SQL
9265f8508e4c Copy other ft and plugin settings
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
29 syntax region perlHereDocSQL matchgroup=perlStringStartEnd start='<<\~\s*\z(\%(END_\)\=SQL\)' end='^\s*\z1$' contains=@perlInterpDQ,@SQL

mercurial