doxnit / cmp-luasnip-choice

Luasnip choice node completion source for nvim-cmp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cmp-luasnip-choice

luasnip choice node completion source for nvim-cmp

demo.mp4

Installation via Packer

use { 'L3MON4D3/LuaSnip' }
use {
  'hrsh7th/nvim-cmp',
  config = function ()
    require'cmp'.setup {
      snippet = {
        expand = function(args)
          require'luasnip'.lsp_expand(args.body)
        end
      },

      sources = {
        { name = 'luasnip_choice' },
        -- more sources
      },
    }
  end
}
use {
  'doxnit/cmp-luasnip-choice',
  config = function()
    require('cmp_luasnip_choice').setup({
        auto_open = true, -- Automatically open nvim-cmp on choice node (default: true)
    });
  end,
}

About

Luasnip choice node completion source for nvim-cmp


Languages

Language:Lua 100.0%