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

Snippets! #2

Closed
clason opened this issue Aug 14, 2020 · 8 comments
Closed

Snippets! #2

clason opened this issue Aug 14, 2020 · 8 comments
Labels
help wanted Extra attention is needed idea

Comments

@clason
Copy link

clason commented Aug 14, 2020

What?
What it says on the tin: a pure Lua snippet engine.

Why?
The major snippet plugins (UltiSnips, neosnippets) are remote python plugins, which adds a dependency. There's also https://github.com/hrsh7th/vim-vsnip in pure vimscript, though, but Lua should have significantly better performance and be more hackable. It should support the basic features: snippet management (either in its own format, UltiSnip/neosnippet format, or LSP); snippet expansion (including nested placeholders) and ideally transformation.

Potential existing implementations:
https://github.com/norcalli/snippets.nvim, which is useable but still lacks a few of the above features.

Potential pitfalls:
Ideally, the expansion should be based on extmarks, but that requires the PR https://github.com/neovim/neovim/pull/12249/files to be merged first.

@clason clason added help wanted Extra attention is needed idea labels Aug 14, 2020
@wbthomason wbthomason added this to Ideas in Project Ideas via automation Aug 17, 2020
@clason
Copy link
Author

clason commented Aug 17, 2020

I think snippets.nvim deserves being moved to the "In Progress" tab :)

@wbthomason wbthomason moved this from Ideas to In progress in Project Ideas Aug 17, 2020
@wbthomason
Copy link
Collaborator

Good point; I've updated the state of all the ideas for which we had a documented partial/in-progress implementation.

@clason
Copy link
Author

clason commented Aug 19, 2020

Actually, snippets.nvim is arguably full-featured enough now to merit being put into the "Done" category 👍

(Otherwise it'd be worth specifying what precisely counts as a "Done" plugin...)

@wbthomason
Copy link
Collaborator

Cool, sounds good.

@wbthomason wbthomason moved this from In progress to Granted wishes in Project Ideas Aug 19, 2020
@smolck
Copy link

smolck commented Aug 19, 2020

(Otherwise it'd be worth specifying what precisely counts as a "Done" plugin...)

That should probably be done regardless, right?

@wbthomason
Copy link
Collaborator

Yeah, that's a good idea. I'd suggest something like "A wish is 'granted' when there exists a feature-complete, stable plugin implementing the wish's idea". snippets.nvim calls itself beta-quality software, so it's not clear that it would meet the "stable" criterion there, but in practice it has seemed stable and feature-complete.

Does that seem reasonable?

@clason
Copy link
Author

clason commented Aug 19, 2020

Yeah, that makes sense. (The readme isn't up-to-date, but @norcalli called it basically done on Gitter today.)

@runiq
Copy link

runiq commented Aug 19, 2020

It has a wiki now, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed idea
Projects
Project Ideas
  
Granted wishes
Development

No branches or pull requests

4 participants