@@ -11,7 +11,7 @@ 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: get_float_positioning (height, width)
14
+ function ! s: get_float_positioning (height, width) abort
15
15
let l: height = a: height
16
16
let l: width = a: width
17
17
" For a start show it below/above the cursor
@@ -31,7 +31,7 @@ function! s:get_float_positioning(height, width)
31
31
let l: height = &lines - l: y
32
32
endif
33
33
endif
34
- let l: col = col (" . " )
34
+ let l: col = col (' . ' )
35
35
" Positioning is not window but screen relative
36
36
let l: opts = {
37
37
\ ' relative' : ' win' ,
@@ -48,13 +48,13 @@ function! lsp#ui#vim#output#floatingpreview(data) abort
48
48
call setbufvar (l: buf , ' &signcolumn' , ' no' )
49
49
50
50
" Try to get as much pace right-bolow the cursor, but at least 10x10
51
- let l: width = max ([float2nr (&columns - col (" . " ) - 10 ), 10 ])
51
+ let l: width = max ([float2nr (&columns - col (' . ' ) - 10 ), 10 ])
52
52
let l: height = max ([&lines - winline () + 1 , 10 ])
53
53
54
54
let l: opts = s: get_float_positioning (l: height , l: width )
55
55
56
56
let s: win = nvim_open_win (buf , v: true , l: opts )
57
- call nvim_win_set_option (s: win , ' winhl' , " Normal:Pmenu,NormalNC:Pmenu" )
57
+ call nvim_win_set_option (s: win , ' winhl' , ' Normal:Pmenu,NormalNC:Pmenu' )
58
58
call nvim_win_set_option (s: win , ' foldenable' , v: false )
59
59
call nvim_win_set_option (s: win , ' wrap' , v: true )
60
60
call nvim_win_set_option (s: win , ' statusline' , ' ' )
@@ -87,7 +87,7 @@ function! lsp#ui#vim#output#preview(data) abort
87
87
88
88
let &l: filetype = l: ft . ' .lsp-hover'
89
89
" Get size information while still having the buffer active
90
- let l: bufferlines = line (" $ " )
90
+ let l: bufferlines = line (' $ ' )
91
91
let l: maxwidth = max (map (getline (1 , ' $' ), ' strdisplaywidth(v:val)' ))
92
92
93
93
if g: lsp_preview_keep_focus
0 commit comments