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

[Feat request] Possibility to exclude some snippets from lazy_load() #197

Closed
lambtho12 opened this issue Oct 12, 2021 · 3 comments
Closed

Comments

@lambtho12
Copy link

For some languages, friendly-snippets provide multiple snippet files. This is for instance the case of markdown, where snippets are loaded from global.json, markdown.json and vscode-jekyll-snippets.json.

I do not know if it would be possible, but it would be nice if we could explicitly include or exclude some snippets file from friendly-snippets. I think this could be done either by providing a custom package.json that would replace the default one provided by friendly-snippet or provide an option to list specific snippets to exclude.

In my specific case, I would like to exclude vscode-jekyll-snippets.json as I do not have any use for them.

@lambtho12 lambtho12 changed the title Possibility to exclude some snippets from lazy_load() [Feat request] Possibility to exclude some snippets from lazy_load() Oct 12, 2021
@leiserfg
Copy link
Contributor

leiserfg commented Oct 12, 2021

One simple option is to fork friendly-snippets, another is to watch the user-event LuasnipSnippetsAdded and modify the table accordingly (but that won't help filtering snippets from certain files).
I guess if you are happy with the snippets included there already, forking is the easier solution.

@L3MON4D3
Copy link
Owner

I agree with fixing this in the source of the snippets, they should provide snippets for specific filetypes or frameworks eg. markdown and jekyll, and mixing/providing snippets from both sources is the job of snippet engines.
I'd be surprised if friendly-snippets doesn't accept a PR to not automatically expose jekyll-snippets for markdown

@lambtho12
Copy link
Author

Indeed, it would be better if friendly-snippet was not automatically merging various sources together. I agree with you and will ask there instead.

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