Replies: 2 comments 2 replies
-
you can use blink compact as their is no official blink plugin for r completion for now, you can use this as the basis for starting your own |
Beta Was this translation helpful? Give feedback.
2 replies
-
I have things configured pretty much out of the box, with some tweaks added over time. I'm not using blink.compat, but maybe should be ... Anyway, my lua is here: return {
"saghen/blink.cmp",
opts = {
snippets = {
expand = function(snippet, _)
return LazyVim.cmp.expand(snippet)
end,
},
appearance = {
-- sets the fallback highlight groups to nvim-cmp's highlight groups
-- useful for when your theme doesn't support blink.cmp
-- will be removed in a future release, assuming themes add support
use_nvim_cmp_as_default = false,
-- set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
-- adjusts spacing to ensure icons are aligned
nerd_font_variant = "mono",
},
completion = {
accept = {
-- experimental auto-brackets support
auto_brackets = {
enabled = true,
},
},
menu = {
draw = {
treesitter = { "lsp" },
},
},
documentation = {
auto_show = true,
auto_show_delay_ms = 200,
},
ghost_text = {
enabled = vim.g.ai_cmp,
},
},
-- experimental signature help support
-- signature = { enabled = true },
sources = {
-- adding any nvim-cmp sources here will enable them
-- with blink.compat
compat = {},
default = { "lsp", "path", "snippets", "buffer", "copilot" },
-- default = { "lsp", "path", "snippets", "buffer" },
providers = {
lsp = {
name = "lsp",
enabled = true,
module = "blink.cmp.sources.lsp",
kind = "LSP",
-- When linking markdown notes, I would get snippets and text in the
-- suggestions, I want those to show only if there are no LSP
-- suggestions
--
-- Enabled fallbacks as this seems to be working now
-- Disabling fallbacks as my snippets wouldn't show up when editing
-- lua files
-- fallbacks = { "snippets", "buffer" },
score_offset = 100, -- the higher the number, the higher the priority
},
path = {
name = "Path",
module = "blink.cmp.sources.path",
score_offset = 50,
-- When typing a path, I would get snippets and text in the
-- suggestions, I want those to show only if there are no path
-- suggestions
fallbacks = { "snippets", "buffer" },
opts = {
trailing_slash = false,
label_trailing_slash = true,
get_cwd = function(context)
return vim.fn.expand(("#%d:p:h"):format(context.bufnr))
end,
show_hidden_files_by_default = true,
},
},
buffer = {
name = "Buffer",
enabled = true,
max_items = 3,
module = "blink.cmp.sources.buffer",
min_keyword_length = 4,
score_offset = 25, -- the higher the number, the higher the priority
},
copilot = {
name = "copilot",
enabled = true,
module = "blink-cmp-copilot",
kind = "Copilot",
min_keyword_length = 3,
score_offset = 25, -- the higher the number, the higher the priority
async = true,
},
},
-- cmdline = {},
},
keymap = {
preset = "default",
["<Tab>"] = { "select_and_accept" },
},
},
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey - many thanks for this plugin.
Does it work with blink.cmp? How would one use this
cmp.r
package in this case? Many thanks.Beta Was this translation helpful? Give feedback.
All reactions