mirror of https://github.com/dense-analysis/ale
Merge pull request #2173 from chaucerbao/feature/find-references-line-text
Add associated line text on ALEFindReferences results for TypeScript
This commit is contained in:
commit
1d87c844b0
|
@ -27,6 +27,7 @@ function! ale#references#HandleTSServerResponse(conn_id, response) abort
|
|||
\ 'filename': l:response_item.file,
|
||||
\ 'line': l:response_item.start.line,
|
||||
\ 'column': l:response_item.start.offset,
|
||||
\ 'match': substitute(l:response_item.lineText, '^\s*\(.\{-}\)\s*$', '\1', ''),
|
||||
\})
|
||||
endfor
|
||||
|
||||
|
|
|
@ -135,9 +135,9 @@ Execute(Results should be shown for tsserver responses):
|
|||
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {'filename': '/foo/bar/app.ts', 'column': 9, 'line': 9},
|
||||
\ {'filename': '/foo/bar/app.ts', 'column': 3, 'line': 804},
|
||||
\ {'filename': '/foo/bar/other/app.ts', 'column': 3, 'line': 51},
|
||||
\ {'filename': '/foo/bar/app.ts', 'column': 9, 'line': 9, 'match': 'import {doSomething} from ''./whatever'''},
|
||||
\ {'filename': '/foo/bar/app.ts', 'column': 3, 'line': 804, 'match': 'doSomething()'},
|
||||
\ {'filename': '/foo/bar/other/app.ts', 'column': 3, 'line': 51, 'match': 'doSomething()'},
|
||||
\ ],
|
||||
\ g:item_list
|
||||
AssertEqual {}, ale#references#GetMap()
|
||||
|
|
Loading…
Reference in New Issue