]> git.madduck.net Git - etc/lazyvim.git/blob - .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:

Enable signature popups from blink
[etc/lazyvim.git] / .config / lazyvim / lua / config / keymaps.lua
1 -- Keymaps are automatically loaded on the VeryLazy event
2 -- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
3 -- Add any additional keymaps here
4
5 local map = vim.keymap.set
6
7 -- I don't want help with F1
8 map({ "i", "n", "c", "v" }, "<F1>", "<Esc>", { remap = false })
9
10 -- restore abbreviation expansion in addition to undo break
11 -- (see https://github.com/LazyVim/LazyVim/discussions/5967#discussioncomment-12859255)
12 map("i", ",", "<c-]>,<c-g>u")
13 map("i", ".", "<c-]>.<c-g>u")
14 map("i", ";", "<c-]>;<c-g>u")
15
16 local function toggle_completion()
17   local c = vim.b.completion
18   if c == nil then
19     c = true
20   end
21   c = (c == nil and false or not c)
22   vim.b.completion = c
23   vim.notify("Completion turned " .. (c and "on" or "off"))
24 end
25
26 map({ "n", "v", "o" }, "<leader>cc", toggle_completion, { desc = "Toggle completion" })