Replies: 1 comment 9 replies
|
you might be able to do something with luasnip, but that might be unappealing for you |
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
#197 has been there for long time without progress, but that feature is really useful because every project may have its unique snippets.
In a multi-root workspace in VSCode, you can define project-scoped snippets that are only available when the project is active. The project-scoped snippet files are stored in the
.vscodesubdirectory in the project root.For blink.cmp, I can have a function that modifies
search_pathsdynamically to add the project's.vscodewhenever a project's root is detected, and use an auto command to triggers the function uponDirChangedandBufReadPostevents. But this only works with the first open project. Making changes tosearch_pathslater doesn't make blink to refresh the snippets (clearing the old ones and loading the new ones from the new search paths). For example, when switching from project A into project B, the snippets for project A are still there, while the snippets for project B are not loading. I gave a try torequire("blink.cmp").reload("snippets")after changing thesearch_paths, butreload()seems to do nothing more than emptying the internal cache.With the limited knowledge of blink.cmp, I have no idea how to implement the fully functional project-scoped snippets feature as in VSCode.
All reactions