zdcthomas / cmp_luasnip

luasnip completion source for nvim-cmp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cmp_luasnip

luasnip completion source for nvim-cmp

-- Installation
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' },
      -- more sources
    },
  }
  end
}
use { 'saadparwaiz1/cmp_luasnip' }

To disable filtering completion candidates by snippet's show_condition use the following options in sources:

sources = {
  { name = 'luasnip', option = { use_show_condition = false } },
  -- more sources
},

This can also be configured on per-buffer basis as described in cmp's README here and here.

About

luasnip completion source for nvim-cmp

License:Apache License 2.0


Languages

Language:Lua 100.0%