-
Notifications
You must be signed in to change notification settings - Fork 0
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
Plugin development #1
Comments
Hello @echasnovski, The plugin is working. Would it be possible to have The documentation popup is In On each completion, all snippets do need to be transformed into results for |
Yes, I'd say no extra caching should be needed, but there are nuances. 'mini.snippets' already does proper amount of caching with built-in loaders plus there is an example for even more caching. The only nuance is that it is designed for manual expand which is relatively rare, but 'nvim-cmp' source will be computed way more frequently (gut feeling is at least 10x more). The single prepare step (after the initial reading data from disk) in my Lua setup with about 100 snippets to resolve takes:
Another issue here might be to correctly decide what to use as caching identifier. 'mini.snippets' implements the idea of "context" which (in theory) can be any table. |
Then there is no need to
The only way to make an educated decision here is by profiling, I am afraid. |
Thanks!
Of course. I intend to read the help again...). I thought there wouldn't be a session, my mistake.
Indeed. I have never done that for
Do you have an opinion regarding my question concerning the popup window? |
Answered in #2.
This line might indeed be time consuming so might be worth caching. Not sure about the best cache id, though. One extra problem here is that Other than that, using fenced code block after |
That cursor is a problem unfortunately. Perhaps I can keep using |
This doesn't look like the reason is inserting at cursor. The reason is that The See also this part about general
This might result in showing |
Yes, I will try to pass the region based on |
I'd suggest removing it manually before calling |
I added a new commit. The code is much shorter than I thought it would be. Do you think the plugin is ready to be announced? I plan to first work on finishing the LazyVim PR. Then, I will do the profiling for the cache. |
If it works, then looks good :) I'll wait a bit for all the issues to iron out (week, two?), then plan to add this to 'mini.snippets' README. |
That's great! |
As far as I can tell, your plugin has earlier first commit with at least some version of the actual code (by about 4 hours, curiously). Plus, you're the long time 'mini.nvim' user. So if that's up to me, I'll use this one if/when I need to recommend an 'nvim-cmp' source for 'mini.snippets'. I trust you can iron out any possible issues (but I don't expect many). Plus LazyVim PR should also get you covered.
Not a total surprise, though, as there was public info about it. This is all open source, people can work on the same things at the same time. |
Yes you're right. Thanks for the support and for answering my questions! |
Test setup:
mini_snippets_with_sources
in this PR to filelua/plugins/extras/coding/mini_snippets_with_sources.lua
in your local configextras
nvim-cmp
andmini_snippets_with_sources
(a "user" extra)Checklist
The text was updated successfully, but these errors were encountered: