@@ -11,15 +11,15 @@ function! lsp#ui#vim#output#closepreview() abort
11
11
autocmd ! lsp_float_preview_close CursorMoved ,CursorMovedI ,VimResized *
12
12
endfunction
13
13
14
- function ! s: bufwidth ()
14
+ function ! s: bufwidth () abort
15
15
let width = winwidth (0 )
16
16
let numberwidth = max ([&numberwidth , strlen (line (' $' ))+ 1 ])
17
17
let numwidth = (&number || &relativenumber )? numberwidth : 0
18
18
let foldwidth = &foldcolumn
19
19
20
- if &signcolumn == ' yes'
20
+ if &signcolumn == ? ' yes'
21
21
let signwidth = 2
22
- elseif &signcolumn == ' auto'
22
+ elseif &signcolumn == ? ' auto'
23
23
let signs = execute (printf (' sign place buffer=%d' , bufnr (' ' )))
24
24
let signs = split (signs, " \n " )
25
25
let signwidth = len (signs)>2 ? 2 : 0
@@ -63,7 +63,7 @@ function! s:get_float_positioning(height, width) abort
63
63
endfunction
64
64
65
65
function ! lsp#ui#vim#output#floatingpreview (data) abort
66
- if has (" nvim" )
66
+ if has (' nvim' )
67
67
let l: buf = nvim_create_buf (v: false , v: true )
68
68
call setbufvar (l: buf , ' &signcolumn' , ' no' )
69
69
@@ -93,9 +93,8 @@ function! lsp#ui#vim#output#floatingpreview(data) abort
93
93
endfunction
94
94
95
95
function ! s: setcontent (lines , ft ) abort
96
- if s: supports_floating && g: lsp_preview_float && ! has (" nvim" )
96
+ if s: supports_floating && g: lsp_preview_float && ! has (' nvim' )
97
97
" vim popup
98
- echom " Vimp Popup SetContent"
99
98
call setbufline (winbufnr (s: win ), 1 , a: lines )
100
99
call win_execute (s: win , ' setlocal filetype=' . a: ft . ' .lsp-hover' )
101
100
else
@@ -107,7 +106,7 @@ function! s:setcontent(lines, ft) abort
107
106
endfunction
108
107
109
108
function ! s: adjust_float_placement (bufferlines, maxwidth) abort
110
- if has (" nvim" )
109
+ if has (' nvim' )
111
110
let l: win_config = {}
112
111
let l: height = min ([winheight (s: win ), a: bufferlines ])
113
112
let l: width = min ([winwidth (s: win ), a: maxwidth ])
@@ -151,7 +150,7 @@ function! lsp#ui#vim#output#preview(data) abort
151
150
152
151
echo ' '
153
152
154
- if s: supports_floating && s: win && g: lsp_preview_float && has (" nvim" )
153
+ if s: supports_floating && s: win && g: lsp_preview_float && has (' nvim' )
155
154
call s: adjust_float_placement (l: bufferlines , l: maxwidth )
156
155
call s: add_float_closing_hooks ()
157
156
endif
0 commit comments