completion/resolve support for documentation and use the new floating window (#1052)

* doc

* floating window with completion/resolve

* add comments

* use _split_by_eol

* copy event

* fix dupe

* Fix size/markdown/detail

* - Improve for exceptional case
- Fix code style
- Support detail only case

* Add lsp_float_opened/lsp_float_closed

* remove old documentation code

* update documenation and change flags to use g:lsp_completion_documentation

Co-authored-by: hrsh7th <hrsh7th@gmail.com>
This commit is contained in:
Prabir Shrestha
2021-01-23 09:11:27 -08:00
committed by GitHub
parent 7380d31c4f
commit cacfc79eb4
14 changed files with 586 additions and 292 deletions

View File

@@ -63,6 +63,7 @@ function! lsp#enable() abort
call lsp#internal#diagnostics#_enable()
call lsp#internal#show_message_request#_enable()
call lsp#internal#work_done_progress#_enable()
call lsp#internal#completion#documentation#_enable()
call s:register_events()
endfunction
@@ -76,6 +77,7 @@ function! lsp#disable() abort
call lsp#internal#diagnostics#_disable()
call lsp#internal#show_message_request#_disable()
call lsp#internal#work_done_progress#_disable()
call lsp#internal#completion#documentation#_disable()
call s:unregister_events()
let s:enabled = 0
endfunction
@@ -473,7 +475,7 @@ function! lsp#default_get_supported_capabilities(server_info) abort
\ 'completion': {
\ 'dynamicRegistration': v:false,
\ 'completionItem': {
\ 'documentationFormat': ['plaintext'],
\ 'documentationFormat': ['markdown', 'plaintext'],
\ 'snippetSupport': v:false,
\ 'resolveSupport': {
\ 'properties': ['additionalTextEdits']
@@ -857,8 +859,6 @@ function! s:handle_initialize(server_name, data) abort
call l:Init_callback(a:data)
endfor
call lsp#ui#vim#documentation#setup()
doautocmd <nomodeline> User lsp_server_init
endfunction