all repos

dotfiles @ da1068fdc2e6c53bd0ef2b816c417338a6078f5a

my dotfiles

config/lvim/lua/user/keymaps.lua (view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
lvim.keys.normal_mode["<C-w>"] = "<cmd>BufferClose<cr>"
lvim.keys.normal_mode["<C-s>"] = "<cmd>w<cr>"
lvim.keys.visual_mode["jk"] = "<esc>"

-- Which key
lvim.builtin.which_key.mappings.l.a = { "<cmd>Telescope lsp_code_actions<cr>", "Code Actions" }
lvim.builtin.which_key.mappings.l.d = { "<cmd>TroubleToggle<cr>", "Diagnostics" }
lvim.builtin.which_key.mappings.l.R = { "<cmd>TroubleToggle lsp_references<cr>", "References" }
lvim.builtin.which_key.mappings.s.P = { "<cmd>Telescope projects<cr>", "Projects" }
lvim.builtin.which_key.mappings["t"] = {
  name = "Test",
  t = { "<cmd>Ultest<cr>", "Run tests" },
  s = { "<cmd>UltestStop<cr>", "Stop tests" },
  c = { "<cmd>UltestClear<cr>", "Clear result" },
  n = { "<cmd>UltestNearest<cr>", "Run test" },
  o = { "<cmd>UltestOutput<cr>", "Show output" },
  j = { "<Plug>(ultest-next-fail)", "Next fail" },
  k = { "<Plug>(ultest-prev-fail)", "Prev fail" },
}

-- Beffers
local fmt = string.format
for i = 1, 9 do
  lvim.keys.normal_mode[fmt("<A-%d>", i)] = fmt("<cmd>BufferGoto %d<cr>", i)
end