summaryrefslogtreecommitdiff
path: root/.vim/pack/vendor/start/nerdtree/syntax
diff options
context:
space:
mode:
authorSam Chudnick <sam@chudnick.com>2023-06-11 07:54:59 -0400
committerSam Chudnick <sam@chudnick.com>2023-06-11 07:54:59 -0400
commit3adcf542289a0883924ae9b9be8b898c36702c95 (patch)
treef02166ef4c95161ffa994eb1a3e5729c93c2c66b /.vim/pack/vendor/start/nerdtree/syntax
parentdfcc303e7cc284a45f55bae81ed888dc256432b8 (diff)
Add some Vim plugins
Diffstat (limited to '.vim/pack/vendor/start/nerdtree/syntax')
-rw-r--r--.vim/pack/vendor/start/nerdtree/syntax/nerdtree.vim97
1 files changed, 97 insertions, 0 deletions
diff --git a/.vim/pack/vendor/start/nerdtree/syntax/nerdtree.vim b/.vim/pack/vendor/start/nerdtree/syntax/nerdtree.vim
new file mode 100644
index 0000000..c4197ee
--- /dev/null
+++ b/.vim/pack/vendor/start/nerdtree/syntax/nerdtree.vim
@@ -0,0 +1,97 @@
1let s:tree_up_dir_line = '.. (up a dir)'
2syn match NERDTreeIgnore #\~#
3exec 'syn match NERDTreeIgnore #\['.g:NERDTreeGlyphReadOnly.'\]#'
4
5"highlighting for the .. (up dir) line at the top of the tree
6execute "syn match NERDTreeUp #\\V". s:tree_up_dir_line .'#'
7
8"quickhelp syntax elements
9syn match NERDTreeHelpKey #" \{1,2\}[^ ]*:#ms=s+2,me=e-1
10syn match NERDTreeHelpKey #" \{1,2\}[^ ]*,#ms=s+2,me=e-1
11syn match NERDTreeHelpTitle #" .*\~$#ms=s+2,me=e-1
12syn match NERDTreeToggleOn #(on)#ms=s+1,he=e-1
13syn match NERDTreeToggleOff #(off)#ms=e-3,me=e-1
14syn match NERDTreeHelpCommand #" :.\{-}\>#hs=s+3
15syn match NERDTreeHelp #^".*# contains=NERDTreeHelpKey,NERDTreeHelpTitle,NERDTreeIgnore,NERDTreeToggleOff,NERDTreeToggleOn,NERDTreeHelpCommand
16
17"highlighting for sym links
18syn match NERDTreeLinkTarget #->.*# containedin=NERDTreeDir,NERDTreeFile
19syn match NERDTreeLinkFile #.* ->#me=e-3 containedin=NERDTreeFile
20syn match NERDTreeLinkDir #.*/ ->#me=e-3 containedin=NERDTreeDir
21
22"highlighting to conceal the delimiter around the file/dir name
23if has('conceal')
24 exec 'syn match NERDTreeNodeDelimiters #\%d' . char2nr(g:NERDTreeNodeDelimiter) . '# conceal containedin=ALL'
25 setlocal conceallevel=2 concealcursor=nvic
26else
27 exec 'syn match NERDTreeNodeDelimiters #\%d' . char2nr(g:NERDTreeNodeDelimiter) . '# containedin=ALL'
28 hi! link NERDTreeNodeDelimiters Ignore
29endif
30
31"highlighing for directory nodes and file nodes
32syn match NERDTreeDirSlash #/# containedin=NERDTreeDir
33
34if g:NERDTreeDirArrowExpandable !=# ''
35 exec 'syn match NERDTreeClosable #' . escape(g:NERDTreeDirArrowCollapsible, '~') . '\ze .*/# containedin=NERDTreeDir,NERDTreeFile'
36 exec 'syn match NERDTreeOpenable #' . escape(g:NERDTreeDirArrowExpandable, '~') . '\ze .*/# containedin=NERDTreeDir,NERDTreeFile'
37 let s:dirArrows = escape(g:NERDTreeDirArrowCollapsible, '~]\-').escape(g:NERDTreeDirArrowExpandable, '~]\-')
38 exec 'syn match NERDTreeDir #[^'.s:dirArrows.' ].*/#'
39 exec 'syn match NERDTreeExecFile #^.*'.g:NERDTreeNodeDelimiter.'\*\($\| \)# contains=NERDTreeRO,NERDTreeBookmarkName'
40 exec 'syn match NERDTreeFile #^[^"\.'.s:dirArrows.'] *[^'.s:dirArrows.']*# contains=NERDTreeLink,NERDTreeRO,NERDTreeBookmarkName,NERDTreeExecFile'
41else
42 exec 'syn match NERDTreeDir #[^'.g:NERDTreeNodeDelimiter.']\{-}/\ze\($\|'.g:NERDTreeNodeDelimiter.'\)#'
43 exec 'syn match NERDTreeExecFile #[^'.g:NERDTreeNodeDelimiter.']\{-}'.g:NERDTreeNodeDelimiter.'\*\($\| \)# contains=NERDTreeRO,NERDTreeBookmarkName'
44 exec 'syn match NERDTreeFile #^.*'.g:NERDTreeNodeDelimiter.'.*[^\/]\($\|'.g:NERDTreeNodeDelimiter.'.*\)# contains=NERDTreeLink,NERDTreeRO,NERDTreeBookmarkName,NERDTreeExecFile'
45endif
46
47"highlighting for readonly files
48exec 'syn match NERDTreeRO #.*'.g:NERDTreeNodeDelimiter.'\zs.*\ze'.g:NERDTreeNodeDelimiter.'.*\['.g:NERDTreeGlyphReadOnly.'\]# contains=NERDTreeIgnore,NERDTreeBookmarkName,NERDTreeFile'
49
50exec 'syn match NERDTreeFlags #\[[^\]]*\]\ze'.g:NERDTreeNodeDelimiter.'# containedin=NERDTreeFile,NERDTreeExecFile,NERDTreeLinkFile,NERDTreeRO,NERDTreeDir'
51
52syn match NERDTreeCWD #^[</].*$#
53
54"highlighting for bookmarks
55syn match NERDTreeBookmarkName # {.*}#hs=s+2,he=e-1
56
57"highlighting for the bookmarks table
58syn match NERDTreeBookmarksLeader #^>#
59syn match NERDTreeBookmarksHeader #^>-\+Bookmarks-\+$# contains=NERDTreeBookmarksLeader
60syn match NERDTreeBookmarkName #^>.\{-} #he=e-1 contains=NERDTreeBookmarksLeader
61syn match NERDTreeBookmark #^>.*$# contains=NERDTreeBookmarksLeader,NERDTreeBookmarkName,NERDTreeBookmarksHeader
62
63hi def link NERDTreePart Special
64hi def link NERDTreePartFile Type
65hi def link NERDTreeExecFile Title
66hi def link NERDTreeDirSlash Identifier
67
68hi def link NERDTreeBookmarksHeader statement
69hi def link NERDTreeBookmarksLeader ignore
70hi def link NERDTreeBookmarkName Identifier
71hi def link NERDTreeBookmark normal
72
73hi def link NERDTreeHelp String
74hi def link NERDTreeHelpKey Identifier
75hi def link NERDTreeHelpCommand Identifier
76hi def link NERDTreeHelpTitle Macro
77hi def link NERDTreeToggleOn Question
78hi def link NERDTreeToggleOff WarningMsg
79
80hi def link NERDTreeLinkTarget Type
81hi def link NERDTreeLinkFile Macro
82hi def link NERDTreeLinkDir Macro
83
84hi def link NERDTreeDir Directory
85hi def link NERDTreeUp Directory
86hi def link NERDTreeFile Normal
87hi def link NERDTreeCWD Statement
88hi def link NERDTreeOpenable Directory
89hi def link NERDTreeClosable Directory
90hi def link NERDTreeIgnore ignore
91hi def link NERDTreeRO WarningMsg
92hi def link NERDTreeBookmark Statement
93hi def link NERDTreeFlags Number
94
95hi def link NERDTreeCurrentNode Search
96
97hi NERDTreeFile ctermbg=NONE guibg=NONE