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 cape-yasnipet #17

Closed
Crandel opened this issue Dec 10, 2021 · 5 comments
Closed

Add cape-yasnipet #17

Crandel opened this issue Dec 10, 2021 · 5 comments

Comments

@Crandel
Copy link

Crandel commented Dec 10, 2021

Thank you @minad for such a nice project!
Is it possible to add cape-yasnipet completion function? Company-yasnippet is built-in into company-mode and I want to skip installing whole package only for this functionality.

@minad
Copy link
Owner

minad commented Dec 10, 2021

Thanks!

cape-yasnippet is out of scope of Cape since it depends on a third-party package. Maybe someone will create a yasnippet-capf package at some point? In the meantime you can either use consult-yasnippet if you use Consult or you can install Company and use company-yasnippet via the cape-company-to-capf adapter.

If you are interested in digging a bit deeper, you can also take the file company-yasnippet.el and remove the company dependency (remove all calls to company functions). This is actually easy to do since there are not many such calls and the existing ones can be replaced with builtins. After having done that you will end up with a Company-style backend (which still uses the Company API) but without the Company dependency. You can use this backend with the cape-company-to-capf adapter. In the next step and if you haven't lost interested by then you could convert the API from the Company API to the default Capf API. Then we would end up with a yasnippet-capf backend which could be packaged up and distributed separately.

Please let me know if you have further questions.

@minad minad closed this as completed Dec 10, 2021
@Crandel
Copy link
Author

Crandel commented Dec 10, 2021

Thank you for quick response. I will definitely try consult-yasnippet as I use consult a lot.

@minad
Copy link
Owner

minad commented Jan 5, 2022

I saw the thread on reddit and created https://github.com/minad/tempel. It is not yasnippet but at least it is simple :)

@Crandel
Copy link
Author

Crandel commented Jan 5, 2022

Looks promising, I will try it

@maikol-solis
Copy link

This package/script works reasonably nice

https://github.com/elken/cape-yasnippet

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

3 participants