added support for compiler-assisted "go to definition" and omnicompletion
This commit is contained in:
parent
b26c3696e9
commit
81c2f4aa69
3 changed files with 88 additions and 32 deletions
|
|
@ -18,29 +18,6 @@ CompilerSet errorformat=
|
|||
\%E%f(%l\\,\ %c)\ Error:\ %m,
|
||||
\%W%f(%l\\,\ %c)\ Hint:\ %m
|
||||
|
||||
" Syntastic syntax checking
|
||||
function! SyntaxCheckers_nimrod_GetLocList()
|
||||
let save_cur = getpos('.')
|
||||
call cursor(0, 0, 0)
|
||||
|
||||
let PATTERN = "\\v^\\#\\s*included from \\zs.*\\ze"
|
||||
let l = search(PATTERN, "n")
|
||||
|
||||
if l != 0
|
||||
let f = matchstr(getline(l), PATTERN)
|
||||
let l:to_check = expand('%:h') . "/" . f
|
||||
else
|
||||
let l:to_check = expand("%")
|
||||
endif
|
||||
|
||||
call setpos('.', save_cur)
|
||||
|
||||
let makeprg = 'nimrod check ' . l:to_check
|
||||
let errorformat = &errorformat
|
||||
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
endfunction
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue