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

Feature request - "regular" inserter #26

Open
ranjithshegde opened this issue Apr 5, 2021 · 6 comments
Open

Feature request - "regular" inserter #26

ranjithshegde opened this issue Apr 5, 2021 · 6 comments

Comments

@ranjithshegde
Copy link

When using snippets.nvim to expand/complete LSP snippets, it would be helpful to have autocomplete, further snippets and other features related to the current buffer where the snip was called from.
This is not possible of course when using floaty ux inserter or vim input inserter as they are not expanded in the current buffer.

So the feature is, could there be a possibility of and an inserter for expanding the snippets in the current buffer, much like UltiSnips/vim-vsnip etc?

@clason
Copy link
Contributor

clason commented Jun 14, 2021

There's the text_markers inserter -- it's not pretty (using literal markers instead of extmarks, which were not available at the time this was written), but it works.

@ranjithshegde
Copy link
Author

Thank you for your response. I did try text_markers after creating this issue, but like you said, its a bit not easy on the eyes and at times can confuse you. But yes it does work for the purposes I had in mind.

Are there plans to implement the exmarks for this inserter method in the future? I understand that everyone is busy with 0.5 release

@clason
Copy link
Contributor

clason commented Jun 14, 2021

The extmarks functionality in neovim should already be implemented (although there are still a few rough spots to polish, which may be relevant here). The corresponding inserter needs to be written (should be a relatively straightforward modification of text_markers.lua).

I believe @norcalli has pretty much abandoned this plugin (which is a pity, because at least for me it's still the best Lua snippet engine out there), so somebody else needs to write it and probably distribute it as a separate plugin.

@trv6
Copy link

trv6 commented Jul 14, 2021

I made an attempt at this. https://gist.github.com/trv6/353031dfb9b86f83e5318b93a2a2efb8

@clason
Copy link
Contributor

clason commented Jul 14, 2021

And, because the universe loves symmetry, someone just requested a "floaty inserter" for LuaSnip ;)

@gpanders
Copy link

gpanders commented Jul 21, 2021

I just opened #31 #32. I guess this plugin is not maintained anymore so I don't know if it will be merged, but you are welcome to try my fork if you want.

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

4 participants