nixos/config/nvim/lua/keymaps.lua
2023-02-09 15:47:44 +00:00

33 lines
1.5 KiB
Lua

vim.g.mapleader = ' '
vim.keymap.set('i', 'jk', '<esc>')
-- Toggleterm
vim.keymap.set('n', '<leader>th', '<cmd>ToggleTerm direction=horizontal<cr>')
vim.keymap.set('n', '<leader>tv', '<cmd>ToggleTerm direction=vertical<cr>')
vim.keymap.set('n', '<leader>tf', '<cmd>ToggleTerm direction=float<cr>')
vim.keymap.set('n', '<leader>tt', '<cmd>ToggleTerm direction=tab<cr>')
-- Aerial
vim.keymap.set('n', '<leader>aa', '<cmd>AerialToggle<cr>')
-- Telescope
vim.keymap.set('n', '<leader>;', '<cmd>Telescope builtin<cr>')
vim.keymap.set('n', '<leader>ff', '<cmd>Telescope find_files<cr>')
vim.keymap.set('n', '<leader>fg', '<cmd>Telescope live_grep<cr>')
vim.keymap.set('n', '<leader>fp', '<cmd>Telescope projects<cr>')
vim.keymap.set('n', '<leader>fa', '<cmd>Telescope aerial<cr>')
vim.keymap.set('n', '<leader>fl', '<cmd>Telescope lsp_document_symbols<cr>')
vim.keymap.set('n', '<leader>fe', '<cmd>Telescope diagnostics<cr>')
vim.keymap.set('n', '<leader>fs', '<cmd>Telescope treesitter<cr>')
vim.keymap.set('n', '<leader>fz', '<cmd>Telescope current_buffer_fuzzy_find<cr>')
-- Nvim-tree
vim.keymap.set('n', '<leader>n', '<cmd>NvimTreeToggle<cr>')
-- Trouble
vim.keymap.set('n', '<leader>xx', '<cmd>TroubleToggle<cr>')
vim.keymap.set('n', '<leader>xw', '<cmd>TroubleToggle workspace_diagnostics<cr>')
vim.keymap.set('n', '<leader>xd', '<cmd>TroubleToggle document_diagnostics<cr>')
vim.keymap.set('n', '<leader>xq', '<cmd>TroubleToggle quickfix<cr>')
vim.keymap.set('n', '<leader>xl', '<cmd>TroubleToggle loclist<cr>')