]> 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:

configure catppuccin the lazy way
[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 -- restore abbreviation expansion in addition to undo break
8 -- (see https://github.com/LazyVim/LazyVim/discussions/5967#discussioncomment-12859255)
9 map("i", ",", "<c-]>,<c-g>u")
10 map("i", ".", "<c-]>.<c-g>u")
11 map("i", ";", "<c-]>;<c-g>u")
12
13 local function toggle_completion()
14   local c = vim.b.completion
15   if c == nil then
16     c = true
17   end
18   c = (c == nil and false or not c)
19   vim.b.completion = c
20   vim.notify("Completion turned " .. (c and "on" or "off"))
21 end
22
23 map({ "n", "v", "o" }, "<leader>cc", toggle_completion, { desc = "Toggle completion" })