Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

refactor(snippet): rework luasnip source#2238

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
soifou wants to merge11 commits intomain
base:main
Choose a base branch
Loading
fromrefactor/luasnip-source

Conversation

@soifou
Copy link
Collaborator

@soifousoifou commentedNov 1, 2025
edited
Loading

Some refactoring on this source for easier maintenance with better annotations.

A potential fix for#1081. Possibly a race condition causing duplicated snippets due to premature cache initialization. I haven't been able to reproduce it myself, so if anyone wants to test it out, that'd be great!

TheinsertText is "improved" to be more like other snippet engines or LSPs. For example, for awhile~ snippet, it showswhi|le true do instead of the actualwhi|le, with support of multi-line snippets, etc., (fallback to the label/trigger). I think it'd align better with what we observe elsewhere.

Deprecation ofopts.prefer_doc_trig (defaulttrue, to be removed inv2) since it has proven very useful and reliable over the months since its introduction.

TODO:

@soifousoifouforce-pushed therefactor/luasnip-source branch from8539836 to2ed5d8eCompareNovember 11, 2025 22:54
blink.cmp v1.0.0 has been release 8 months ago, this check can besafely removed now.
Instead of displaying only `trigger`, first try to generate thepreview from the snippet's textNodes; if that's not available, fallback to `docTrig` if it exists, or use the `trigger` as a last resort.
This setting, which prefers `docTrig` over the trigger, is confusing andhas seen little adoption despite its usefulness.Users can still opt out in v1.0, but the option will be removed in v2.0to simplify the codebase.
Update lua annotations using refactor branchFix `docTrig` replacement using Luasnip v2.4.1Add initial support for choice nodes
@soifousoifouforce-pushed therefactor/luasnip-source branch from2ed5d8e toa280624CompareNovember 11, 2025 23:00
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@soifou

[8]ページ先頭

©2009-2025 Movatter.jp