Skip to content
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

blink.cmp Integration #1263

Open
leiserfg opened this issue Nov 25, 2024 · 3 comments
Open

blink.cmp Integration #1263

leiserfg opened this issue Nov 25, 2024 · 3 comments

Comments

@leiserfg
Copy link
Contributor

Hi @L3MON4D3, how is live going?

I moved to blink.cmp, so now this exists in case you are interested:

https://github.com/leiserfg/blink_luasnip

@L3MON4D3
Copy link
Owner

Going fine, still finding time to tinker with neovim :D (as do you I see :P)

blink seems pretty cool, I'm definitely interested! Can blink also do trigger-on-keybind, with only a few sources, like cmp? eg. something like

vim.keymap.set("i", "<C-O>", function()
	cmp.complete({
		config = {
			sources = {
				{name = "nvim_lsp"},
				{name = "luasnip"},
			}
		}
	})
end)

vim.keymap.set("i", "<C-u>", function()
	cmp.complete({
		config = {
			sources = {
				{name = "emoji"},
			}
		}
	})
end)

vim.keymap.set("i", "<C-F>", function()
	cmp.complete({
		config = {
			sources = {
				{
					name = "path",
					option = {
						get_cwd = function(params)
							local path = {
								vim.fn.expand(('#%d:p:h'):format(params.context.bufnr)), -- default value
								vim.fn.getcwd(),
							}
							return path
						end
					},
				}
			}
		}
	})
end)

@leiserfg
Copy link
Contributor Author

I don't see any similar API in blink.

@L3MON4D3
Copy link
Owner

Ah okay, guess I'll stick with cmp for a while longer :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants