~gpanders/dotfiles

ref: 1e9f8dd001f12b57c7ff1b45adb7c59541b752c6 dotfiles/.vim/after/syntax/vhdl.vim -rw-r--r-- 1.9 KiB
1e9f8dd0Gregory Anders fish: remove fuzzy finder from buku alias 5 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
syntax keyword vhdlFunction  falling_edge rising_edge
syntax keyword vhdlFunction  to_unsigned to_signed to_integer

syntax keyword vhdlStatement function procedure nextgroup=vhdlFunction skipwhite
syntax match   vhdlFunction  "\a\w*\ze(" display contained

syntax match   vhdlLabel     "^\s*\zs\I\i*\ze\s*:[A-Za-z ]" display

syntax region  vhdlPorts start="\s\?\<\%(port\|generic\)\_s*(" skip="([^\)]*)" end=")" contains=vhdlStatement,vhdlType,vhdlNumber,vhdlCharacter,vhdlConstant,vhdlBoolean,vhdlString,vhdlAttribute,vhdlOperator,vhdlComment keepend

syntax clear vhdlSpecial
syntax keyword vhdlSpecial and nand or nor xor xnor
syntax keyword vhdlSpecial rol ror sla sll sra srl
syntax keyword vhdlSpecial mod rem abs not

syntax region  vhdlIf matchgroup=vhdlConditional contains=TOP start="\s\?\<\%(els\)\?if\s" end="\sthen\>"
syntax region  vhdlIf matchgroup=vhdlConditional contains=TOP start="\s\?\<if\ze .\{-} generate\>" end="\s\?\<end generate\ze;"
syntax region  vhdlCase matchgroup=vhdlConditional contains=TOP start="\s\?\<case\s" end="\sis\>"
syntax keyword vhdlConditional when else
syntax keyword vhdlConditional contained containedin=vhdlIf generate
syntax match   vhdlConditional "\s\?\<end \%(if\|case\)\ze;"

syntax region  vhdlLoop matchgroup=vhdlRepeat contains=TOP start="\s\?\<\%(for\|while\)\s" end="\sloop\>"
syntax region  vhdlLoop matchgroup=vhdlRepeat contains=TOP start="\s\?\<for\ze .\{-} generate\>" end="\s\?\<end generate\ze;"
syntax keyword vhdlRepeat contained containedin=vhdlLoop in to downto
syntax keyword vhdlRepeat contained containedin=vhdlLoop generate
syntax match   vhdlRepeat "\s\?\<end loop\ze;"

" Xilinx specific attributes
syntax keyword vhdlAttribute MARK_DEBUG ASYNC_REG

highlight default link vhdlFunction    Function
highlight default link vhdlLabel       Label
highlight default link vhdlConditional Conditional
highlight default link vhdlRepeat      Repeat