2

With vim-lsp in java code, after type

System.out.printf

the following candidates appears:

printf(Locale l, String format, Object... args)
printf(String format, Object... args)

When I choose first of the candidates,

System.out.printf

but I want to get:

System.out.printf(l, format, args)

or

System.out.printf(,,)

How can I do this?

Martin Tournoij
  • 26,737
  • 24
  • 105
  • 146
  • Which language server are you using? Apache Camel? The behaviour you want is the behaviour I see with python (pyls), so it may be dependent on support in the language server. – idbrii Feb 13 '20 at 21:31

1 Answers1

0

Try :help vim-lsp-snippets

For example vim-lsp-ultisnips should get you what you want. It uses UltiSnips to let you cycle through the function arguments. The help page has options for other snippet engines.

idbrii
  • 10,975
  • 5
  • 66
  • 107