@@ -542,13 +542,13 @@ function! go#lsp#Info(showstatus)
542
542
let l: state = s: newHandlerState (' ' )
543
543
endif
544
544
545
- let l: state .handleResult = funcref (' s:infoDefinitionHandler' , [function ( ' s:info ' , []), a: showstatus ], l: state )
545
+ let l: state .handleResult = funcref (' s:infoDefinitionHandler' , [a: showstatus ], l: state )
546
546
let l: state .error = funcref (' s:noop' )
547
547
let l: msg = go#lsp#message#Definition (l: fname , l: line , l: col )
548
548
return l: lsp .sendMessage (l: msg , l: state )
549
549
endfunction
550
550
551
- function ! s: infoDefinitionHandler (next , showstatus, msg) abort dict
551
+ function ! s: infoDefinitionHandler (showstatus, msg) abort dict
552
552
" gopls returns a []Location; just take the first one.
553
553
let l: msg = a: msg [0 ]
554
554
@@ -572,6 +572,10 @@ endfunction
572
572
573
573
function ! s: info (content) abort dict
574
574
let l: content = a: content [0 ]
575
+
576
+ " strip godoc summary
577
+ let l: content = substitute (l: content , ' ^[^\n]\+\n' , ' ' , ' ' )
578
+
575
579
" strip off the method set and fields of structs and interfaces.
576
580
if l: content = ~# ' ^type [^ ]\+ \(struct\|interface\)'
577
581
let l: content = substitute (l: content , ' {.*' , ' ' , ' ' )
0 commit comments