nixos/home/editor/neovim/keybinds.lua

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
1.0 KiB
Lua
Raw Permalink Normal View History

2024-02-28 01:46:28 +00:00
-- Keybinds
2024-02-28 02:40:13 +00:00
-- Term
vim.g.floaterm_keymap_toggle = '<leader>ft'
-- Tabs
vim.keymap.set('n', '<leader>n', ':tabnew<CR>',
{ silent = true, desc = '[N]ew tab' })
vim.keymap.set('n', '<leader>p', ':tabnext<CR>',
{ silent = true, desc = '[p]Next tab' })
vim.keymap.set('n', '<leader>P', ':tabprev<CR>',
{ silent = true, desc = '[P]Previous tab' })
-- Telescope
vim.keymap.set('n', '<leader>?', require('telescope.builtin').oldfiles,
{ desc = '[?] FInd recently opened files' })
vim.keymap.set('n', '<leader>ff', require('telescope.builtin').find_files,
{ desc = '[F]ind [F]iles' })
2024-02-28 09:01:01 +00:00
vim.keymap.set('n', '<leader>ff', require('telescope.builtin').find_files,
{ desc = '[F]ind [F]iles' })
vim.keymap.set('n', '<leader>fg', require('telescope.builtin').live_grep,
{ desc = '[F]ind by [G]rep' })
2024-03-01 15:02:40 +00:00
2024-03-06 18:58:59 +00:00
-- Tabs
2024-03-01 15:02:40 +00:00
vim.keymap.set('n', '<leader>tt', ':tabnew<cr>')
vim.keymap.set('n', '<leader>tn', ':tabnext<cr>')
vim.keymap.set('n', '<leader>tp', ':tabprevious<cr>')
2024-03-06 18:58:59 +00:00
-- LSP
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition)