Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
snippets and optional placeholder text (blink.cmp)
Post Flair (click to view more posts with a particular flair)
Post Body

I'm pretty new to nvim and am just going the route of building up on my config whenever I notice "hey maybe this thing could work better". My current issue is working with snippets. I've searched around a bit and haven't been able to find a solution. For snippets/completion I utilize blink.cmp.

What I'm currently experiencing is: I accept the completion and it has place holders. I just experiment with vim.keymap.set(mode, lhs, rhs, opts?). It's reliable and has the placeholders (mode, lhs, rhs, opts?). I can jump with <c-l> <c-h>, type in what I want and move on. Problem is lets say I don't want to put in opts?, I don't have a good way of just removing it and currently just fumble around deleting out the placeholder and extra "," after rhs.

Is there a good way to handle this? Is this functionality something that is easier to achieve via a plugin (luasnip/snippy/ultisnips...)?

My current blink.cmp configs, some of what I have in here are defaults, I have been adding in defaults here and there as it helps me remember when I go looking at a pluginspec for its features.

Any help, tips, or docs to read would be appreciated, thanks!

``` { "saghen/blink.cmp", lazy = false, version = "v0.*", dependencies = { "rafamadriz/friendly-snippets", }, opts = { nerd_font_variant = "mono", opts_extend = { "sources.completion.enabled_providers" }, trigger = { completion = { show_in_snippet = false, }, }, windows = { autocomplete = { draw = "reversed", border = "single", winhighlight = "BlinkCmpDoc:Pmenu", min_width = 25, max_width = 25, max_height = 7, }, documentation = { auto_show = false, border = "single", winhighlight = "BlinkCmpDoc:Pmenu", min_width = 25, max_width = 50, max_height = 15, }, ghost_text = { enabled = false, }, }, accept = { auto_brackets = { enabled = true, }, }, sources = { completion = { enabled_providers = { "lsp", "path", "snippets", "buffer", "lazydev" }, }, providers = { lsp = { fallback_for = { "lazydev" }, min_keyword_length = 2, max_items = 20, }, lazydev = { name = "LazyDev", module = "lazydev.integrations.blink" }, path = { min_keyword_length = 2 }, snippets = { min_keyword_length = 2 }, }, }, keymap = { preset = "default", ["<C-space>"] = { "show", "show_documentation", "hide_documentation" }, ["<C-e>"] = { "hide" }, ["<C-y>"] = { "select_and_accept" },

    ["<C-p>"] = { "select_prev", "fallback" },
    ["<C-n>"] = { "select_next", "fallback" },

    ["<C-b>"] = { "scroll_documentation_up", "fallback" },
    ["<C-f>"] = { "scroll_documentation_down", "fallback" },

    ["<C-l>"] = { "snippet_forward", "fallback" },
    ["<C-h>"] = { "snippet_backward", "fallback" },
  },
},

}

```

Author
Account Strength
40%
Account Age
5 months
Verified Email
Yes
Verified Flair
No
Total Karma
32
Link Karma
1
Comment Karma
31
Profile updated: 1 month ago
Posts updated: 1 month ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
3 months ago