Closed JarKz closed 1 year ago
Makes sense. Changed it with https://github.com/mfussenegger/nvim-jdtls/pull/461
Can someone explain a bit more what is the idea here? jdtls.ui.pick_one
does not use vim.ui.select
. I thought the latter is like a de-facto standard for selecting from a list. Some plugins like fzf-lua even provide utilities to register their own handler for that method. But this doesn't work with nvim-jdtls.
Is this meant to be modified manually? If so, why not also use vim.ui.select
in jdtls.ui.pick_one
?
Problem Statement
Some peoples can use custom
jdtls.ui.pick_one()
method using other plugins like telescope, fzf orvim.ui.select
. I use too, but one method have unmodified selection:java_generate_to_string_prompt
havevim.fn.inputlist
and from outside I can't customize it.Ideas or possible solutions
Replace
vim.fn.inputlist()
method tojdtls.ui.pick_one()
. Must be no negative effects because in sources methodpick_one
look likeinputlist
. Also I checked other places for the presence ofinputlist
and found it in two: jdtls.lua (choice injava_generate_to_string_promt()
) and ui.lua (pick_one()
).Also with custom
pick_one
method (modified by users) works, because methodjava_generate_to_string_prompt
wraps by coroutine.Code will be like:
With my telescope plugin result like: