Initial commit
This commit is contained in:
commit
e7b4be7296
17 changed files with 213 additions and 0 deletions
31
lua/config/mappings.lua
Normal file
31
lua/config/mappings.lua
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
local opts = { noremap = true, silent = true }
|
||||
|
||||
---Make string like ':cmd<CR>'
|
||||
---@param cmd string
|
||||
---@return string
|
||||
local function auto(cmd)
|
||||
return string.format(':%s<CR>', cmd)
|
||||
end
|
||||
|
||||
---Make string like '<Leader>cmd'
|
||||
---@param cmd string
|
||||
---@return string
|
||||
local function ld(cmd)
|
||||
return string.format('<Leader>%s', cmd)
|
||||
end
|
||||
|
||||
return {
|
||||
n = {
|
||||
{ ld('ev'), auto('vsplit $MYVIMRC'), opts },
|
||||
{ ld('sv'), auto('source $MYVIMRC'), opts },
|
||||
{ ld('n'), auto('Telescope find_files'), opts },
|
||||
{ ld('h'), auto('Telescope help_tags'), opts },
|
||||
{ ld('/'), auto('Telescope live_grep'), opts },
|
||||
{ ld('t'), auto('Trouble diagnostics'), opts },
|
||||
{ ld('ds'), ':GdbStart rust-gdb -q target/debug/', opts },
|
||||
--{ ld('?'), function() require("which-key").show({ global = false }) end, opts },
|
||||
},
|
||||
i = {
|
||||
{ 'jk', '<Esc>', opts },
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue