From: Indelog Date: Fri, 19 Nov 2021 09:41:31 +0000 (+0100) Subject: Fix indent style X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=fe7c67fb616706f2ae599ca2b064e16175bca4e9;p=vim-lsp.git Fix indent style --- diff --git a/autoload/handlers.vim b/autoload/handlers.vim index 6c2adaf..7eb74d0 100644 --- a/autoload/handlers.vim +++ b/autoload/handlers.vim @@ -331,26 +331,26 @@ def s:processHoverReply(lspserver: dict, req: dict, reply: dict): return endif if lspOptions.hoverInPreview - silent! pedit HoverReply - wincmd P - setlocal buftype=nofile - setlocal bufhidden=delete - # If lsp server provide kind of hover reply and this kind is in syntaxs - # syported by vim, use it for file type of preview window. Else use - # type text by default. - if reply.result.contents->has_key('kind') -\ && !reply.result.contents.kind->empty() -\ && getcompletion('', 'filetype')->index(reply.result.content.kind) > -1 - exe 'setlocal ft=' .. reply.result.contents.kind - else - set setlocal ft=text - endif - deletebufline(bufnr(), 1, getbufinfo(bufnr())[0].linecount) - append(0, hoverText) - cursor(1, 1) - wincmd p + silent! pedit HoverReply + wincmd P + setlocal buftype=nofile + setlocal bufhidden=delete + # If lsp server provide kind of hover reply and this kind is in syntaxs + # syported by vim, use it for file type of preview window. Else use + # type text by default. + if reply.result.contents->has_key('kind') +\ && !reply.result.contents.kind->empty() +\ && getcompletion('', 'filetype')->index(reply.result.content.kind) > -1 + exe 'setlocal ft=' .. reply.result.contents.kind + else + set setlocal ft=text + endif + deletebufline(bufnr(), 1, getbufinfo(bufnr())[0].linecount) + append(0, hoverText) + cursor(1, 1) + wincmd p else - hoverText->popup_atcursor({moved: 'word'}) + hoverText->popup_atcursor({moved: 'word'}) endif enddef