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

Example of selectively applying snippets #431

Open
danieleavitabile opened this issue Apr 4, 2024 · 2 comments
Open

Example of selectively applying snippets #431

danieleavitabile opened this issue Apr 4, 2024 · 2 comments

Comments

@danieleavitabile
Copy link

I use LuaSnip, and have developed a number of LaTeX snippets. I am now considering adopting friendly-snippets for other languages, while keeping exclusively my own LaTeX snippets for .tex files.

Is there a clear set of instructions for doing that? It's unclear to me whether the instructions for disabling snippets in the home page will disable all tex snippets (including mine) or will only disable the friendly-snippet latex snippets.

@AidenAllredOfficial
Copy link

Hi! You should be able do this by adding the following to your NeoVim config.
require("luasnip.loaders.from_vscode").load { exclude = { "tex", "plaintex" }, }

@OkelleyDevelopment
Copy link
Collaborator

OkelleyDevelopment commented May 28, 2024

I believe the above snippet should accomplish your goal.

Generally the way to handle this will differ between snippet engines, so I will always say to refer back to their docs as this repo just supplies the snippets for the engine to load.

EDIT:

I re-read the message, the above snippet will exclude both. Let me brainstorm some ideas and I will get back to this thread asap (probably later this week).

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