-
Notifications
You must be signed in to change notification settings - Fork 151
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
feat: mini.snippets and snippets presets #877
Conversation
I can handle the documentation when it's ready for review |
… should use _G.MiniSnippets
Great! |
Ready for review. I do hope I implemented
function source:resolve(item, callback)
local snip = item.data.snip
---@diagnostic disable-next-line: undefined-field
local desc = snip.desc
if desc and not item.documentation then
item.documentation = {
kind = 'markdown',
value = table.concat(vim.lsp.util.convert_input_to_markdown_lines(desc), '\n'),
}
end
---@diagnostic disable-next-line: undefined-field
local detail = snip.body
if not item.detail then
if type(detail) == 'table' then detail = table.concat(detail, '\n') end
item.detail = detail
end
callback(item)
end
Question: Is the |
…nippetsSnippet and removed to vim.print
…e about default context. Extra: add option use_items_cache
@echasnovski For the |
That would be |
Makes sense, thank you! |
I use it like this in Lazyvim PR |
bf9c078
to
66d6e38
Compare
Brilliant work, thank you @abeldekat! And thank you for the reviews @echasnovski! |
* feat: mini.snippets and snippets presets * feat: mini.snippets and snippets presets: Remove a vim.notify... * feat: mini.snippets and snippets presets: Review echasnovski. Enabled should use _G.MiniSnippets * feat: mini.snippets and snippets presets: Implemented source:resolve * feat: mini.snippets and snippets presets: Review echasnovski, changed caching * feat: mini.snippets and snippets presets: Improve source:resolve * feat: mini.snippets and snippets presets: Review echasnovski, snippets can be cleared * feat: mini.snippets and snippets presets: Added class blink.cmp.MiniSnippetsSnippet and removed to vim.print * feat: mini.snippets and snippets presets: Review echasnovski, add note about default context. Extra: add option use_items_cache * feat: snippet presets * feat: merge snippets to single source * docs: add back note about wrapping `vim.snippet` calls --------- Co-authored-by: abeldekat <[email protected]> Co-authored-by: Liam Dyer <[email protected]>
That's great! Thank you both! |
Resolves #741
Tested with the LazyVim PR mentioned below. Snippets appear and can be expanded.
Checklist
See also: