feat(lsp): add original LSP Location as item's user_data in locations_to_items (#23743)

This commit is contained in:
Tom Praschan
2023-09-07 10:12:02 +02:00
committed by GitHub
parent ec753cf40d
commit 131a1ee82d
4 changed files with 31 additions and 3 deletions

View File

@@ -2387,7 +2387,14 @@ describe('LSP', function()
filename = '/fake/uri',
lnum = 1,
col = 3,
text = 'testing'
text = 'testing',
user_data = {
uri = 'file:///fake/uri',
range = {
start = { line = 0, character = 2 },
['end'] = { line = 0, character = 3 },
}
}
},
}
local actual = exec_lua [[
@@ -2413,7 +2420,18 @@ describe('LSP', function()
filename = '/fake/uri',
lnum = 1,
col = 3,
text = 'testing'
text = 'testing',
user_data = {
targetUri = "file:///fake/uri",
targetRange = {
start = { line = 0, character = 2 },
['end'] = { line = 0, character = 3 },
},
targetSelectionRange = {
start = { line = 0, character = 2 },
['end'] = { line = 0, character = 3 },
}
}
},
}
local actual = exec_lua [[