Git Product home page Git Product logo

cmp_luasnip's Introduction

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.

The same way you can de-/activate whether autosnippets should be included in the completion list or not (including them can be a bit problematic since when you select the entry, the text gets inserted and the snippet automatically triggers). This option defaults to false to be backwards compatible. Example:

sources = {
  { name = 'luasnip', option = { show_autosnippets = true } },
  -- more sources
},

Hint: If you want to just hide some autosnippets consider the hidden option of luaSnip

cmp_luasnip's People

Contributors

saadparwaiz1 avatar atticus-sullivan avatar l3mon4d3 avatar jedrzejboczar avatar uga-rosa avatar abzcoding avatar n-p-e avatar woodgear avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.