Updated plugins
This commit is contained in:
@@ -56,7 +56,7 @@ func! s:qflistSecond(output)
|
||||
" We discard line2 and col2 for the first errorformat, because it's not
|
||||
" useful and quickfix only has the ability to show one line and column
|
||||
" number
|
||||
let &errorformat = "%f:%l.%c-%.%#:\ %m,%f:%l:%c:\ %m"
|
||||
let &errorformat = "%f:%l.%c-%[%^:]%#:\ %m,%f:%l:%c:\ %m"
|
||||
|
||||
" create the quickfix list and open it
|
||||
cgetexpr split(a:output, "\n")
|
||||
@@ -189,6 +189,27 @@ endfunction
|
||||
" Show all refs to entity denoted by selected identifier
|
||||
function! go#oracle#Referrers(selected)
|
||||
let out = s:RunOracle('referrers', a:selected)
|
||||
|
||||
" append line contents from Go source file for some messages:
|
||||
" '...: referenced here'
|
||||
" '...: reference to NAME'
|
||||
let lines = split(out, "\n")
|
||||
let extlines = []
|
||||
for line in lines
|
||||
if line =~# '\v: referenced here$|: reference to [^ :]*$'
|
||||
let parts = split(line, ':')
|
||||
" Note: we count -3 from end, to support additional comma in
|
||||
" Windows-style C:\... paths
|
||||
let filename = join(parts[0:-3], ':')
|
||||
let linenum = parts[-2]
|
||||
let extline = line . ': ' . readfile(filename, '', linenum)[linenum-1]
|
||||
call add(extlines, extline)
|
||||
else
|
||||
call add(extlines, line)
|
||||
endif
|
||||
endfor
|
||||
let out = join(extlines, "\n")
|
||||
|
||||
call s:qflistSecond(out)
|
||||
endfunction
|
||||
|
||||
|
||||
Reference in New Issue
Block a user