mirror of
https://github.com/mfussenegger/nvim-jdtls
synced 2024-09-16 14:34:13 +02:00
Use jdtls.ui.pick_one
in toString() prompt
Closes https://github.com/mfussenegger/nvim-jdtls/issues/460
This commit is contained in:
parent
ffb8f63689
commit
a2dd26c1c0
1 changed files with 6 additions and 6 deletions
|
@ -88,12 +88,12 @@ local function java_generate_to_string_prompt(_, outer_ctx)
|
|||
return
|
||||
end
|
||||
if result.exists then
|
||||
local choice = vim.fn.inputlist({
|
||||
string.format("Method 'toString()' already exists in '%s'. Do you want to replace it?", result.type),
|
||||
"1. Replace",
|
||||
"2. Cancel"
|
||||
})
|
||||
if choice < 1 or choice == 2 then
|
||||
local prompt = string.format(
|
||||
"Method 'toString()' already exists in '%s'. Do you want to replace it?",
|
||||
result.type
|
||||
)
|
||||
local choice = ui.pick_one({"Replace", "Cancel"}, prompt, tostring)
|
||||
if choice == "Cancel" then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue