mirror of https://github.com/dense-analysis/ale
Merge pull request #1905 from ngavalas/tsserver-classname-fix
Fix tsserver `className` responses
This commit is contained in:
commit
78af99c256
|
@ -264,7 +264,7 @@ function! ale#completion#ParseTSServerCompletionEntryDetails(response) abort
|
||||||
call add(l:documentationParts, l:part.text)
|
call add(l:documentationParts, l:part.text)
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
if l:suggestion.kind is# 'clasName'
|
if l:suggestion.kind is# 'className'
|
||||||
let l:kind = 'f'
|
let l:kind = 'f'
|
||||||
elseif l:suggestion.kind is# 'parameterName'
|
elseif l:suggestion.kind is# 'parameterName'
|
||||||
let l:kind = 'f'
|
let l:kind = 'f'
|
||||||
|
|
|
@ -32,6 +32,13 @@ Execute(TypeScript completion details responses should be parsed correctly):
|
||||||
\ 'kind': 'f',
|
\ 'kind': 'f',
|
||||||
\ 'icase': 1,
|
\ 'icase': 1,
|
||||||
\ },
|
\ },
|
||||||
|
\ {
|
||||||
|
\ 'word': 'ghi',
|
||||||
|
\ 'menu': '(class) Foo',
|
||||||
|
\ 'info': '',
|
||||||
|
\ 'kind': 'f',
|
||||||
|
\ 'icase': 1,
|
||||||
|
\ },
|
||||||
\ ],
|
\ ],
|
||||||
\ ale#completion#ParseTSServerCompletionEntryDetails({
|
\ ale#completion#ParseTSServerCompletionEntryDetails({
|
||||||
\ 'body': [
|
\ 'body': [
|
||||||
|
@ -74,6 +81,17 @@ Execute(TypeScript completion details responses should be parsed correctly):
|
||||||
\ {'text': 'baz'},
|
\ {'text': 'baz'},
|
||||||
\ ],
|
\ ],
|
||||||
\ },
|
\ },
|
||||||
|
\ {
|
||||||
|
\ 'name': 'ghi',
|
||||||
|
\ 'kind': 'className',
|
||||||
|
\ 'displayParts': [
|
||||||
|
\ {'text': '('},
|
||||||
|
\ {'text': 'class'},
|
||||||
|
\ {'text': ')'},
|
||||||
|
\ {'text': ' '},
|
||||||
|
\ {'text': 'Foo'},
|
||||||
|
\ ],
|
||||||
|
\ },
|
||||||
\ ],
|
\ ],
|
||||||
\})
|
\})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue