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

problem reloading snippets #1564

Open
TunnelThruTime opened this issue Jan 30, 2025 · 1 comment
Open

problem reloading snippets #1564

TunnelThruTime opened this issue Jan 30, 2025 · 1 comment

Comments

@TunnelThruTime
Copy link

I've been having a problem with ultisnips and third-party snippets that I'm authoring.

The problem is that ultisnips appears to break each time I author a new snippet and I forget the method I use to fix it.

It is written (I believe) in the docs that Ultisnips will load the new snips without needing to restart vim.

In my specific case I'm authoring snippets from the lilypond language for typesetting music.

The issue I'm facing is that ultisnips doesn't recognize that I've used the command:

:UltiSnipsAddFiletypes ly.lilypond

and so in order to have the cache refreshed
I must type:

:set ft=lilypond

the problem is that I consistly forgotten
between authoring snippets with weeks in between.

I know that I'm supposed to be pointed so the question is how can I bring this up to the community? Apart from wanting the code to be better in retrival of the snippets
I'm also just dumbfounded in the event that my ft=lilypond before i execute the :UltiSnipsAddFiletypes and this doesn't automatically update the cache.

What is it that is happening in the code?
O

@SirVer
Copy link
Owner

SirVer commented Feb 7, 2025

It is written (I believe) in the docs that Ultisnips will load the new snips without needing to restart vim.

Yes and no. UltiSnips used to watch every snippet file for changes and hashed every file before a new snippet is expanded. It no longer does that, because that was too slow for some. However, when you edit a snippet in the same instance that you want to expand it it should work - the cache is cleared when a .snippet file is written within Vim.

Can you /please provide a fully reproducible example, ideally using the approach explained in https://github.com/SirVer/ultisnips/blob/master/CONTRIBUTING.md#reproducing-bugs or if not possible with a minimal vimrc and snippets files and an exact sequence of key strokes that trigger the bug.

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

2 participants