Skip to content

Commit ac7eacd

Browse files
authored
Fix #1016 (#1027)
Closes #1016
1 parent 2ef2f76 commit ac7eacd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

autoload/lsp/ui/vim/documentation.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ function! s:show_documentation(event) abort
109109

110110
let s:last_popup_id = nvim_open_win(l:buffer, v:false, {'relative': 'editor', 'anchor': l:anchor, 'row': l:row, 'col': l:col, 'height': l:height, 'width': l:width, 'style': 'minimal'})
111111
call nvim_win_set_option(s:last_popup_id, 'wrap', v:true)
112+
doautocmd <nomodeline> User lsp_float_opened
112113
return
113114
endif
114115

@@ -127,6 +128,7 @@ function! s:show_documentation(event) abort
127128
let l:col = a:event['col'] - 1
128129
endif
129130
let s:last_popup_id = popup_create('(no documentation available)', {'line': l:line, 'col': l:col, 'pos': l:right ? 'topleft' : 'topright', 'padding': [0, 1, 0, 1], 'border': [1, 1, 1, 1]})
131+
doautocmd <nomodeline> User lsp_float_opened
130132
call setbufvar(winbufnr(s:last_popup_id), 'lsp_syntax_highlights', l:syntax_lines)
131133
call setbufvar(winbufnr(s:last_popup_id), 'lsp_do_conceal', 1)
132134
call lsp#ui#vim#output#setcontent(s:last_popup_id, l:lines, l:ft)
@@ -143,6 +145,7 @@ function! s:close_popup() abort
143145
if s:use_nvim_float && nvim_win_is_valid(s:last_popup_id) | call nvim_win_close(s:last_popup_id, 1) | endif
144146

145147
let s:last_popup_id = -1
148+
doautocmd <nomodeline> User lsp_float_closed
146149
endif
147150
endfunction
148151

0 commit comments

Comments
 (0)