[kak-lsp] going through snippet placeholders

image
Hi guys! I’m liking kakoune/kak-lsp so far!
sometimes when i use autocomplete i get these snippets that come with placeholders, which are likely generated .
how do i use these? so far ive just been ignoring them and manually insert whats in these placeholders.
also escaping back to normal mode removes them.

i know that phantom-selection exists (haven’t installed it yet) but if i were to do this manually what keys should i use?

Once you have selected the snipped with c-p or c-n, just keep typing and you will replace the first placeholder.

Then you need to add this:

map global insert <tab> '<a-;>:try lsp-snippets-select-next-placeholders catch %{ execute-keys -with-hooks <lt>tab> }<ret>' -docstring 'Select next snippet placeholder'

To be able to press tab to jump to the next placeholder.

You can read more about this here: GitHub - kakoune-lsp/kakoune-lsp: Kakoune Language Server Protocol Client

2 Likes

this works! thanks!