This is a plugin that provides an easy way to use xsmd+blink.cmp in neovim.
You can use nvim's package manager to install this plugin.
vim.pack.add({
{ src = "https://github.com/RaquerLabs/xsmd.nvim" },
})
require("xsmd").setup()This can also be used as a blink.cmp plugin:
require("blink.cmp").setup({
completion = {
documentation = { auto_show = false },
menu = {
auto_show = false,
},
}
})You can also use pickers:
vim.keymap.set("n", "<LocalLeader>f", function()
local lines = vim.fn.systemlist("xsmd list")
local items = {}
for _, line in ipairs(lines) do
if line ~= "" then
table.insert(items, {
text = line,
file = line,
})
end
end
Snacks.picker.pick({
title = "xsmd Picker",
items = items,
format = "file",
confirm = function(picker, item)
picker:close() -- Close the picker UI safely
if item and item.file then
local markdown_link = string.format("[](/%s)", item.file)
vim.api.nvim_put({ markdown_link }, "c", true, true)
end
end,
})