From 631c36a9b9c9b3e3e96362b9225216fcd499c04a Mon Sep 17 00:00:00 2001 From: Minijackson Date: Tue, 1 Apr 2025 19:28:53 +0200 Subject: nixvim: switch nvim-cmp -> blink-cmp --- common/nixvim.nix | 57 +++---------------------------------------------------- 1 file changed, 3 insertions(+), 54 deletions(-) diff --git a/common/nixvim.nix b/common/nixvim.nix index abcd4d6..0092744 100644 --- a/common/nixvim.nix +++ b/common/nixvim.nix @@ -351,64 +351,13 @@ inputs: ]; plugins = { - cmp = { + blink-cmp = { enable = true; - settings = { - mapping.__raw = '' - cmp.mapping.preset.insert { - [''] = cmp.mapping.confirm({ select = false }), - - [""] = cmp.mapping(function(fallback) - local luasnip = require("luasnip") - if luasnip.locally_jumpable(1) then - luasnip.jump(1) - else - fallback() - end - end, { "i", "s" }), - - [""] = cmp.mapping(function(fallback) - local luasnip = require("luasnip") - if luasnip.locally_jumpable(-1) then - luasnip.jump(-1) - else - fallback() - end - end, { "i", "s" }), - } - ''; - - snippet.expand = '' - function(args) - require('luasnip').lsp_expand(args.body) - end - ''; - - sources = [ - { name = "nvim_lsp"; } - { name = "cmp_pandoc"; } - # TODO: make this modular - { name = "crates"; } - { name = "luasnip"; } - { name = "calc"; } - { name = "path"; } - { name = "treesitter"; } - { name = "git"; } - { name = "tmux"; } - { name = "spell"; } - # Use \k for iskeyword because of UTF-8 - { - name = "buffer"; - option.keyword_pattern = ''\k\+''; - } - ]; + keymap.preset = "enter"; + completion.documentation.auto_show = true; }; }; - # cmp-buffer.enable = true; - # cmp-calc.enable = true; - # cmp-cmdline.enable = true; - # cmp-git.enable = true; diffview.enable = true; -- cgit v1.2.3