mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
#1520 - Add an :ALEDocumentation for tsserver
This commit is contained in:
@@ -149,3 +149,23 @@ Execute(LSP hover response with lists of strings and marked strings should be ha
|
||||
|
||||
AssertEqual ["foo\nbar\n"], g:echo_list
|
||||
AssertEqual {}, ale#hover#GetMap()
|
||||
|
||||
Execute(tsserver responses for documentation requests should be handled):
|
||||
call ale#hover#SetMap({3: {'show_documentation': 1}})
|
||||
|
||||
call ale#hover#HandleTSServerResponse(
|
||||
\ 1,
|
||||
\ {
|
||||
\ 'command': 'quickinfo',
|
||||
\ 'request_seq': 3,
|
||||
\ 'success': v:true,
|
||||
\ 'body': {
|
||||
\ 'documentation': 'foo is a very good method',
|
||||
\ 'displayString': 'foo bar',
|
||||
\ },
|
||||
\ }
|
||||
\)
|
||||
|
||||
" The preview window should show the text.
|
||||
AssertEqual ['foo is a very good method'], ale#test#GetPreviewWindowText()
|
||||
silent! pclose
|
||||
|
||||
Reference in New Issue
Block a user