]> git.madduck.net Git - etc/lazyvim.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

completion with Shift-Return
authormartin f. krafft <madduck@madduck.net>
Fri, 2 May 2025 18:30:45 +0000 (20:30 +0200)
committermartin f. krafft <madduck@madduck.net>
Wed, 6 Aug 2025 09:57:17 +0000 (11:57 +0200)
.config/lazyvim/lua/plugins/blink-cmp-keymaps.lua [new file with mode: 0644]
.gitignore.d/lazyvim

diff --git a/.config/lazyvim/lua/plugins/blink-cmp-keymaps.lua b/.config/lazyvim/lua/plugins/blink-cmp-keymaps.lua
new file mode 100644 (file)
index 0000000..bf37b58
--- /dev/null
@@ -0,0 +1,20 @@
+return {
+  "saghen/blink.cmp",
+  opts = {
+    keymap = {
+      preset = "default",
+
+      ["<S-Return>"] = {
+        function(cmp)
+          if cmp.snippet_active() then
+            return cmp.accept()
+          else
+            return cmp.select_and_accept()
+          end
+        end,
+        "snippet_forward",
+        "fallback",
+      },
+    },
+  },
+}
index 967daf947986df28383477d92b2bc8d10273df38..688e8db25198392e5e3ab1242b06dd05065b5d06 100644 (file)
@@ -17,6 +17,7 @@
 !/.config/lazyvim/lua/config/keymaps.lua
 !/.config/lazyvim/lua/config/lazy.lua
 !/.config/lazyvim/lua/config/options.lua
+!/.config/lazyvim/lua/plugins/blink-cmp-keymaps.lua
 !/.config/lazyvim/lua/plugins/blink-cmp-manual.lua
 !/.config/lazyvim/lua/plugins/blink-compat-lbdb.lua
 !/.config/lazyvim/lua/plugins/blink-compat.lua