nixos/config/nvim/lua/keymaps.lua

41 lines
2 KiB
Lua
Raw Normal View History

vim.g.mapleader = " "
vim.keymap.set("i", "jk", "<esc>")
vim.keymap.set({ "n", "t" }, "<A-h>", "<CMD>NavigatorLeft<CR>")
vim.keymap.set({ "n", "t" }, "<A-l>", "<CMD>NavigatorRight<CR>")
vim.keymap.set({ "n", "t" }, "<A-k>", "<CMD>NavigatorUp<CR>")
vim.keymap.set({ "n", "t" }, "<A-j>", "<CMD>NavigatorDown<CR>")
vim.keymap.set({ "n", "t" }, "<A-p>", "<CMD>NavigatorPrevious<CR>")
-- Telescope
vim.keymap.set("n", "<leader>f;", "<cmd>Telescope builtin<cr>")
vim.keymap.set("n", "<leader>ff", "<cmd>Telescope find_files<cr>")
vim.keymap.set("n", "<leader>fb", "<cmd>Telescope buffers<cr>")
vim.keymap.set("n", "<leader>fg", "<cmd>Telescope live_grep<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>")
-- Neotree
2023-02-16 11:50:29 +00:00
vim.keymap.set("n", "<leader>n", "<cmd>Neotree toggle<cr>")
vim.keymap.set("n", "<leader>g", "<cmd>Neotree git_status<cr>")
vim.keymap.set("n", "<leader>b", "<cmd>Neotree buffers<cr>")
2023-02-16 11:58:45 +00:00
vim.keymap.set("n", "<leader>\\", "<cmd>Neotree reveal<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>")
2023-02-16 11:58:45 +00:00
-- nvim-test
vim.keymap.set("n", "<leader>ts", "<cmd>TestSuite<cr>")
vim.keymap.set("n", "<leader>tf", "<cmd>TestFile<cr>")
vim.keymap.set("n", "<leader>te", "<cmd>TestEdit<cr>")
vim.keymap.set("n", "<leader>tn", "<cmd>TestNearest<cr>")
vim.keymap.set("n", "<leader>tl", "<cmd>TestLast<cr>")
vim.keymap.set("n", "<leader>tv", "<cmd>TestVisit<cr>")
vim.keymap.set("n", "<leader>ti", "<cmd>TestInfo<cr>")