Skip to content
This repository has been archived by the owner on Dec 3, 2024. It is now read-only.

leiserfg/blink_luasnip

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

blink_luasnip

luasnip completion source for blink.cmp

Forked from cmp_luasnip

Considering you have Luasnip and blink.cmp already setup, add this to your configuration of the latter (example using lazy.nvim):

return {
    {
  "saghen/blink.cmp",

  dependencies = {
    "L3MON4D3/LuaSnip",
    "leiserfg/blink_luasnip",
  },
  opts = {
    --  This one is not mandatory but I think it's a good idea to use the same snippet provider so you use the same 
    --  keybindings regardless of how was the snippet expanded
    accept = {
      expand_snippet = require("luasnip").lsp_expand,
    },
    -- Inscribe luasnip and add it to the list of providers
    sources = {
        completion = {
          enabled_providers = { "lsp", "path", "luasnip", "buffer" },
        },

     providers = {
        luasnip = {
            name = "luasnip",
            module = "blink_luasnip",

            score_offset = -3,

            ---@module 'blink_luasnip'
            ---@type blink_luasnip.Options
            opts = {
                use_show_condition = false, -- disables filtering completion candidates
                show_autosnippets = true, 
                show_ghost_text = false,  -- whether to show a preview of the selected snippet (experimental)
            },
        },
      },
      },
    ...
}

About

luasnip completion source for blink.cmp

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Lua 100.0%