mirror of
https://github.com/mfussenegger/nvim-jdtls
synced 2024-09-16 14:34:13 +02:00
Include source set indicator in move
target selection
Otherwise it's not possible to distinguish between test and main if a package exists in both, as both would appear the same.
This commit is contained in:
parent
3492d44b75
commit
aebfc22877
1 changed files with 11 additions and 1 deletions
|
@ -282,7 +282,17 @@ local function move_file(command, code_action_params)
|
|||
ui.pick_one_async(
|
||||
destinations,
|
||||
'Target package> ',
|
||||
function(x) return x.project .. ' » ' .. (x.isParentOfSelectedFile and '* ' or '') .. x.displayName end,
|
||||
function(x)
|
||||
local name = x.project .. ' » ' .. (x.isParentOfSelectedFile and '* ' or '') .. x.displayName
|
||||
if string.find(x.path, "src/main") then
|
||||
name = "main » " .. name
|
||||
elseif string.find(x.path, "src/test") then
|
||||
name = "test » " .. name
|
||||
else
|
||||
name = x.path .. " » " .. name
|
||||
end
|
||||
return name
|
||||
end,
|
||||
function(x)
|
||||
local move_params = {
|
||||
moveKind = 'moveResource',
|
||||
|
|
Loading…
Reference in a new issue