Replies: 3 comments 8 replies
-
I am also interested in this , any news on this? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Seems related to #1340 |
Beta Was this translation helpful? Give feedback.
0 replies
-
@DrKGD @LamprosPitsillos I got triggering snippets by a semicolon opts = {
sources = {
providers = {
snippy = {
name = 'snippy',
module = 'utils.snippy',
min_keyword_length = 1,
max_items = 8,
should_show_items = function(ctx) return ctx.trigger.initial_character == ';' end,
override = {
get_trigger_characters = function(_) return { ';' } end,
resolve = function(_, item) item.insertText = ';' .. item.insertText end,
},
},
buffer = {
min_keyword_length = 2,
max_items = 8,
should_show_items = function(ctx) return ctx.trigger.initial_character ~= ';' end,
},
},
},
} |
Beta Was this translation helpful? Give feedback.
8 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.
-
I'd like to display snippets only by prefixing them using ";", so far i've found someone who already dealt with that
He also provides a way to "delete" the special prefix character soon after accepting the snippet, but I feel like it is more of a hack and could easily break.
I tried experimenting on my own, but I don't think it is possibile to hijack the item itself to drop the prefix character, all I managed to do is prefixing the displayed label with the character itself
Note that I am not using luasnip as of now (as it is duplicating results) but the builtin snippet source, having friendly-snippets installed. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions