diff options
| author | Eugene Triguba <hello@eugenetriguba.com> | 2025-12-20 10:53:14 -0500 |
|---|---|---|
| committer | Eugene Triguba <hello@eugenetriguba.com> | 2025-12-20 10:54:02 -0500 |
| commit | 7b6dbb921650e2a52929f025b67be57609fda6d4 (patch) | |
| tree | 895416312698cfe4ac61d4eed0f071d7743c0214 /.config/nvim/lua/eugenetriguba/plugins/blink.lua | |
| parent | Remove openbsd conditional in zsh (diff) | |
| download | dotfiles-7b6dbb921650e2a52929f025b67be57609fda6d4.zip | |
Rework dotfiles to *only* contain dotfiles
Diffstat (limited to '.config/nvim/lua/eugenetriguba/plugins/blink.lua')
| -rw-r--r-- | .config/nvim/lua/eugenetriguba/plugins/blink.lua | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/.config/nvim/lua/eugenetriguba/plugins/blink.lua b/.config/nvim/lua/eugenetriguba/plugins/blink.lua new file mode 100644 index 0000000..0026798 --- /dev/null +++ b/.config/nvim/lua/eugenetriguba/plugins/blink.lua @@ -0,0 +1,67 @@ +vim.pack.add { + { + name = 'blink.cmp', + src = 'https://github.com/saghen/blink.cmp', + version = 'v1.8.0', + }, + { + name = 'LuaSnip', + src = 'https://github.com/L3MON4D3/LuaSnip', + }, + { + name = 'friendly-snippets', + src = 'https://github.com/rafamadriz/friendly-snippets', + }, + { + name = 'lazydev.nvim', + src = 'https://github.com/folke/lazydev.nvim', + }, + { + name = 'blink-cmp-copilot', + src = 'https://github.com/giuxtaposition/blink-cmp-copilot', + }, +} +vim.api.nvim_create_autocmd('PackChanged', { + callback = function(args) + local spec = args.data.spec + if spec and spec.name == 'blink.cmp' then + if args.data.kind == 'install' or args.data.kind == 'update' then + vim.notify('Building blink.cmp...', vim.log.levels.INFO) + vim.system({ 'cargo', '+nightly', 'build', '--release' }, { cwd = spec.path, text = true }, function(result) + if result.code == 0 then + vim.notify('blink.cmp build successful!', vim.log.levels.INFO) + else + vim.notify('blink.cmp build failed: ' .. (result.stderr or ''), vim.log.levels.ERROR) + end + end) + end + end + end, +}) +require('luasnip.loaders.from_vscode').lazy_load() +require('blink.cmp').setup { + keymap = { + preset = 'default', + }, + appearance = { + nerd_font_variant = 'mono', + }, + completion = { + documentation = { auto_show = true, auto_show_delay_ms = 500 }, + }, + sources = { + default = { 'lsp', 'path', 'snippets', 'lazydev', 'copilot' }, + providers = { + lazydev = { module = 'lazydev.integrations.blink', score_offset = 100 }, + copilot = { + name = 'copilot', + module = 'blink-cmp-copilot', + score_offset = 100, + async = true, + }, + }, + }, + snippets = { preset = 'luasnip' }, + fuzzy = { implementation = 'prefer_rust_with_warning' }, + signature = { enabled = true }, +} |