flocon/dot_config/nvim/lua/core/keybinds.lua

17 lines
588 B
Lua
Raw Normal View History

-- lua/core/keymaps.lua
local function map(mode, lhs, rhs, opts)
local options = { noremap = true, silent = true }
if opts then options = vim.tbl_extend('force', options, opts) end
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
end
-- CHADTree
map('n', '<leader>v', '<cmd>CHADopen<CR>')
-- Telescope
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})