Condition usage
#1298
Replies: 2 comments
-
Or a more simple example: s('testSnip', t('Simple text'), {
condition = function()
return false
end,
}), |
Beta Was this translation helpful? Give feedback.
0 replies
-
And to clarify, I'm returning this snippet in an array from its own file, then in my config function I have: -- Load custom snippets from the snippets directory
require('luasnip.loaders.from_lua').load({
paths = {
vim.fn.stdpath('config') .. '/snippets',
},
})
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Am I missing something regarding how condtions are supposed to work? I would think that condtion is a function that determines whether or not a snippet is available. However, this snippet is always available, whether or not I make the function return true or false:
Beta Was this translation helpful? Give feedback.
All reactions