From b45ee8ec6c760089c68fb28a5436ec8275ca5381 Mon Sep 17 00:00:00 2001 From: w0rp Date: Sun, 14 Mar 2021 21:10:05 +0000 Subject: Close #2102 - Add support for the Angular language server --- test/test_go_to_definition.vader | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'test/test_go_to_definition.vader') diff --git a/test/test_go_to_definition.vader b/test/test_go_to_definition.vader index c7805932..3807bb05 100644 --- a/test/test_go_to_definition.vader +++ b/test/test_go_to_definition.vader @@ -343,6 +343,29 @@ Execute(Other files should be jumped to for LSP definition responses): AssertEqual [3, 8], getpos('.')[1:2] AssertEqual {}, ale#definition#GetMap() +Execute(Newer LocationLink items should be supported): + call ale#definition#SetMap({3: {'open_in': 'current-buffer'}}) + call ale#definition#HandleLSPResponse( + \ 1, + \ { + \ 'id': 3, + \ 'result': { + \ 'targetUri': ale#path#ToURI(ale#path#Simplify(g:dir . '/completion_dummy_file')), + \ 'targetRange': { + \ 'start': {'line': 2, 'character': 7}, + \ }, + \ }, + \ } + \) + + AssertEqual + \ [ + \ 'edit +3 ' . fnameescape(ale#path#Simplify(g:dir . '/completion_dummy_file')), + \ ], + \ g:expr_list + AssertEqual [3, 8], getpos('.')[1:2] + AssertEqual {}, ale#definition#GetMap() + Execute(Locations inside the same file should be jumped to without using :edit): call ale#definition#SetMap({3: {'open_in': 'current-buffer'}}) call ale#definition#HandleLSPResponse( -- cgit v1.2.3