-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnvimrc-genode
90 lines (74 loc) · 2.58 KB
/
nvimrc-genode
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
" Reset options
set path=.,/usr/include
let g:ale_cpp_clang_options=""
let g:ale_cpp_gcc_options=""
let cpp_include_options=""
" Repositories
let repos=['base', 'os']
" let cpp_include_path+=['gems']
" Spec
" let specs=['32bit']
let specs=['64bit']
let specs+=['x86']
let specs+=['x86_64']
for repo in repos
let repo_include_path="repos/" . repo . "/include"
if !isdirectory(repo_include_path)
echoerr "Include path for repo " . repo . " not found: " . repo_include_path
continue
endif
" Add repo include path to vim search path
let &path.="," . repo_include_path
let cpp_include_options=" -I " . repo_include_path
" Check if repo has board specific includes
for spec in specs
" let spec_include_path=repo_include_path . "/spec/" . spec . "/" . repo
let spec_include_path=repo_include_path . "/spec/" . spec
if isdirectory(spec_include_path)
let &path.="," . spec_include_path
let cpp_include_options.=" -I " . spec_include_path
endif
endfor
let g:ale_cpp_clang_options.=cpp_include_options
let g:ale_cpp_gcc_options.=cpp_include_options
endfor
" Make
let &makeprg="make"
" Make - build_dir
" let &makeprg.=" -C " . expand('%:p:h')
" let &makeprg.=" -C " . expand('<sfile>:p:h')
let &makeprg.=" -C " . $GENODE
let &makeprg.="/build/"
" let &makeprg.="x86_32"
" let &makeprg.="x86_64"
" let &makeprg.="linux"
let &makeprg.="wg_linux"
" let &makeprg.="wg_tmp"
" Make - target
let &makeprg.=" "
" let &makeprg.=" run/"
" let &makeprg.="noux_gdb"
" let &makeprg.="hello-wg1"
" let &makeprg.="app/ping"
" let &makeprg.="server/wg"
let &makeprg.="run/wg"
" Make - verbosity
let &makeprg.=" VERBOSE="
" let &makeprg.=" VERBOSE_MK="
"
" ALE options
let g:ale_max_buffer_history_size=1000
" let g:ale_linters = {'cpp': ['ccls', 'clang', 'clangcheck', 'clangd', 'clangtidy', 'clazy', 'cppcheck', 'cpplint', 'cquery', 'flawfinder', 'gcc']}
" Disable clangcheck, clangtidy until compile db is availabe
let g:ale_linters = {'cpp': ['ccls', 'clang', 'clangd', 'cppcheck', 'cpplint', 'flawfinder', 'gcc']}
set errorformat^=%-G%f:%l:\ warning:%m
autocmd BufNewFile,BufReadPost *.inc setfiletype make
autocmd BufEnter *.[ch] call ale#toggle#Disable()
hi TabLineFill ctermfg=none ctermbg=none
hi TabLine ctermfg=DarkGreen ctermbg=none
hi TabLineSel ctermfg=Red ctermbg=Yellow
cs add /home/dsh2/src/HC/genode/contrib/wireguard-b81dd8eccae60ec8c044e91a2b8c98ad47969b93/src/wg/src/cscope.out
autocmd vimrc BufReadPost runtime,*.inc,*.port :set filetype=make
autocmd vimrc BufReadPost *.xsd,*.config :set filetype=xml
autocmd vimrc BufReadPost *.run,tool/run/*,.*/run/*.inc :set filetype=tcl
" set commentstring=#\ %s