Skip to content

Add blink_luasnip #378

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -638,35 +638,31 @@ MiniDeps.add({
- [ripgrep](https://github.com/niuiic/blink-cmp-rg.nvim)
- [blink-ripgrep](https://github.com/mikavilpas/blink-ripgrep.nvim)
- [vim-dadbod-completion](https://github.com/kristijanhusak/vim-dadbod-completion)
- [blink_luasnip](https://github.com/leiserfg/blink_luasnip)

### Luasnip

There's currently no `blink.cmp` native source for [luasnip](https://github.com/L3MON4D3/LuaSnip). You may use [blink.compat](https://github.com/saghen/blink.compat) plugin with the [cmp_luasnip](https://github.com/saadparwaiz1/cmp_luasnip) nvim-cmp source in the meantime.

```lua
{
'saghen/blink.cmp',
version = '0.*',
dependencies = {
'L3MON4D3/LuaSnip',
'saadparwaiz1/cmp_luasnip',
-- lock compat to tagged versions, if you've also locked blink.cmp to tagged versions
{ 'saghen/blink.compat', version = '*', opts = { impersonate_nvim_cmp = true } } },
"leiserfg/blink_luasnip" },
opts = {
accept = {
expand_snippet = function(snippet) require('luasnip').lsp_expand(snippet) end,
},
sources = {
completion = {
-- WARN: add the rest of your providers here, unless you're using `opts_extend`
-- and defining this outside of your primary `blink.cmp` config
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line should be kept

-- see the default configuration for the default providers
enabled_providers = { 'luasnip' },
},
providers = {
luasnip = {
name = 'luasnip',
module = 'blink.compat.source',
module = 'blink_luasnip',

score_offset = -3,

Expand Down