Little renovations
This commit is contained in:
parent
9b6b27cd1c
commit
ace123f657
14 changed files with 135 additions and 109 deletions
22
lua/config/mappings.lua
Normal file
22
lua/config/mappings.lua
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
---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
|
||||
|
||||
|
||||
local builtin = require('telescope.builtin')
|
||||
vim.keymap.set('n', ld('ff'), builtin.find_files, { desc = 'Telescope find files' })
|
||||
vim.keymap.set('n', ld('fg'), builtin.live_grep, { desc = 'Telescope live grep' })
|
||||
vim.keymap.set('n', ld('fb'), builtin.buffers, { desc = 'Telescope buffers' })
|
||||
vim.keymap.set('n', ld('fh'), builtin.help_tags, { desc = 'Telescope help tags' })
|
||||
|
||||
vim.keymap.set('n', ld('tt'), auto('Trouble diagnostics toggle'), {desc = 'Toggle diagnostics (Trouble)'})
|
||||
Loading…
Add table
Add a link
Reference in a new issue