Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add snippet location at end of completion #783

Closed
chrisduerr opened this issue Mar 30, 2019 · 1 comment
Closed

Add snippet location at end of completion #783

chrisduerr opened this issue Mar 30, 2019 · 1 comment

Comments

@chrisduerr
Copy link

I'm not certain if this is a problem with LC or if it's the language server, but I thought I'd just ask here first.

After #379 has been resolved (thanks a lot to everyone involved!) it's possible to have snippet managers automatically handle arguments in completions (jump between them). However I've been missing the option to have a jump-to point at the end of function definitions.

I think an example might explain this best. This is currently what I get when completing a function:

test(<`1:huh: usize`>, <`2:hah: isize`>)

This makes it possible to first edit the first parameter, then the second. But moving by a single character in vim can be a bit annoying, so if I would want to add an ; at the end of the line, it's not perfect.

To compensate for this, a lot of snippets (at least in neosnippet) add an additional point the user can jump to at the end of snippets, as a kind of 'exit point' which allows users to continue after the snippet.

Something like that:

test(<`1:huh: usize`>, <`2:hah: isize`>)<`3:`>
@autozimu
Copy link
Owner

autozimu commented Apr 6, 2019

This plugin will present whatever snippet returned by language servers. For the described behaviour, you'd better served at language server side.

@autozimu autozimu closed this as completed Apr 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants