forked from dbgx/lldb.nvim
-
Notifications
You must be signed in to change notification settings - Fork 1
/
lldb.vim
61 lines (54 loc) · 2.19 KB
/
lldb.vim
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
let name = expand('%')[6:]
if name == 'logs'
syn match LLCmdMarker /→/ conceal contained
syn match LLCmd /→.*$/ contains=LLCmdMarker
syn match LLCmdOutMarker /✓/ conceal contained
syn match LLCmdOut /✓.*$/ contains=LLCmdOutMarker
syn match LLCmdErrMarker /✗/ conceal contained
syn match LLCmdErr /✗.*$/ contains=LLCmdErrMarker
hi def link LLCmdMarker Ignore
hi def link LLCmdOutMarker Ignore
hi def link LLCmdErrMarker Ignore
hi def link LLCmd Comment
hi def link LLCmdOut Debug
hi def link LLCmdErr Exception
elseif name == 'backtrace'
syn match LLFrameNumber /frame \zs#[0-9]\+/ contained
syn match LLSelectedFrame /^ \* .*/ contains=LLFrameNumber
syn match LLOtherFrame /^ .*/ contains=LLFrameNumber
hi def link LLFrameNumber Number
hi def link LLSelectedFrame Statement
hi def link LLOtherFrame Comment
elseif name == 'breakpoints'
syn match LLBpId /^[0-9]\+/ contained
syn match LLBpParams /[a-z]\+ = \zs[^,]\+\|resolved/ contained
syn match LLBpLine /^[0-9]\+: .*/ contains=LLBpId,LLBpParams
syn match LLBpLocLine /^ [0-9]\+.[0-9]\+: .*/ contains=LLBpParams
hi def link LLBpId Number
hi def link LLBpParams Identifier
hi def link LLBpLine Statement
hi def link LLBpLocLine Comment
elseif name == 'locals'
syn match LLVarType /^(\zs.\+\ze)/ contained
syn match LLVarIdent /) \zs\i\+\ze = /
syn match LLVarLine /^([^=]\+\i\+ = .*/ contains=LLVarType,LLVarIdent
hi def link LLVarType Type
hi def link LLVarIdent Identifier
elseif name == 'threads'
syn match LLThreadNumber /thread \zs#[0-9]\+/ contained
syn match LLThreadParams /[:,] [a-z ]\+ = \zs[^,]\+/ contained
syn match LLSelectedThread /^\* .*/ contains=LLThreadNumber,LLThreadParams
syn match LLOtherThread /^ .*/ contains=LLThreadNumber,LLThreadParams
hi def link LLThreadNumber Number
hi def link LLThreadParams Identifier
hi def link LLSelectedThread Statement
hi def link LLOtherThread Comment
elseif name == 'registers'
syn match LLRegHex /0x[0-9a-f]\+/
syn match LLRegIdent /^ \+\zs\i\+\ze = /
syn cluster LLRegLine contains=LLRegIdent,LLRegIdent
hi def link LLRegHex Number
hi def link LLRegIdent Identifier
elseif name == 'disassembly'
set syntax=asm
endif