Skip to content

RaquerLabs/xsmd.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xsmd.nvim

This is a plugin that provides an easy way to use xsmd+blink.cmp in neovim.

Installation

You can use nvim's package manager to install this plugin.

vim.pack.add({
  { src = "https://github.com/RaquerLabs/xsmd.nvim" },
})
require("xsmd").setup()

blink.cmp plugin

This can also be used as a blink.cmp plugin:

require("blink.cmp").setup({
  completion = {
    documentation = { auto_show = false },
    menu = {
      auto_show = false,
    },
  }
})

pickers

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,
  })

About

No description, website, or topics provided.

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages