]> git.madduck.net Git - etc/lazyvim.git/blobdiff - .config/lazyvim/lua/config/keymaps.lua

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:

disable blink-compat debug mode
[etc/lazyvim.git] / .config / lazyvim / lua / config / keymaps.lua
index c36aaf89dd42f5b756a3b72db0a2e1c122ef9e70..d094242d513629db61b5bd0c5ee1697524893d1e 100644 (file)
@@ -4,8 +4,23 @@
 
 local map = vim.keymap.set
 
+-- I don't want help with F1
+map({ "i", "n", "c", "v" }, "<F1>", "<Esc>", { remap = false })
+
 -- restore abbreviation expansion in addition to undo break
 -- (see https://github.com/LazyVim/LazyVim/discussions/5967#discussioncomment-12859255)
 map("i", ",", "<c-]>,<c-g>u")
 map("i", ".", "<c-]>.<c-g>u")
 map("i", ";", "<c-]>;<c-g>u")
+
+local function toggle_completion()
+  local c = vim.b.completion
+  if c == nil then
+    c = true
+  end
+  c = (c == nil and false or not c)
+  vim.b.completion = c
+  vim.notify("Completion turned " .. (c and "on" or "off"))
+end
+
+map({ "n", "v", "o" }, "<leader>cc", toggle_completion, { desc = "Toggle completion" })