Move keymaps to separate file
This commit is contained in:
parent
6291dad86d
commit
7d6bad1419
|
@ -19,54 +19,4 @@ vim.g.loaded_ruby_provider = 0
|
|||
vim.g.loaded_perl_provider = 0
|
||||
|
||||
-- Keymaps
|
||||
vim.keymap.set("i", "jk", "<esc>")
|
||||
vim.keymap.set("n", "<leader>l", "<cmd>Lazy<CR>")
|
||||
vim.keymap.set("n", "<leader>m", "<cmd>Mason<CR>")
|
||||
vim.keymap.set("n", "<leader>s", "<cmd>Dashboard<CR>")
|
||||
vim.keymap.set("n", "<leader>z", "<cmd>ZenMode<CR>")
|
||||
vim.keymap.set("n", "<leader>gf", "<cmd>Neogit<CR>")
|
||||
vim.keymap.set("n", "<leader>gg", "<cmd>Neogit kind=split<CR>")
|
||||
vim.keymap.set("n", "<leader>cc", "<cmd>Neogit commit<CR>")
|
||||
vim.keymap.set("n", "<leader>gp", "<cmd>Neogit kind=split pull<CR>")
|
||||
vim.keymap.set("n", "<leader>gP", "<cmd>Neogit kind=split push<CR>")
|
||||
vim.keymap.set("n", "<leader>/", "<cmd>ToggleTerm<CR>")
|
||||
vim.keymap.set("n", "<leader>tt", "<cmd>ToggleTerm direction=float<CR>")
|
||||
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>;", "<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>fb", "<cmd>Telescope buffers<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>")
|
||||
vim.keymap.set("n", "<leader>fp", "<cmd>Telescope projects<cr>")
|
||||
|
||||
-- Neotree
|
||||
vim.keymap.set("n", "<leader>n", "<cmd>Neotree toggle<cr>")
|
||||
vim.keymap.set("n", "<leader>\\", "<cmd>Neotree reveal<cr>")
|
||||
|
||||
-- Aerial
|
||||
vim.keymap.set("n", "<leader>a", "<cmd>AerialToggle!<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>")
|
||||
|
||||
-- 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>")
|
||||
require "config.keymaps"
|
||||
|
|
51
config/nvim/lua/config/keymaps.lua
Normal file
51
config/nvim/lua/config/keymaps.lua
Normal file
|
@ -0,0 +1,51 @@
|
|||
vim.keymap.set("i", "jk", "<esc>")
|
||||
vim.keymap.set("n", "<leader>l", "<cmd>Lazy<CR>")
|
||||
vim.keymap.set("n", "<leader>m", "<cmd>Mason<CR>")
|
||||
vim.keymap.set("n", "<leader>s", "<cmd>Dashboard<CR>")
|
||||
vim.keymap.set("n", "<leader>z", "<cmd>ZenMode<CR>")
|
||||
vim.keymap.set("n", "<leader>gf", "<cmd>Neogit<CR>")
|
||||
vim.keymap.set("n", "<leader>gg", "<cmd>Neogit kind=split<CR>")
|
||||
vim.keymap.set("n", "<leader>cc", "<cmd>Neogit commit<CR>")
|
||||
vim.keymap.set("n", "<leader>gp", "<cmd>Neogit kind=split pull<CR>")
|
||||
vim.keymap.set("n", "<leader>gP", "<cmd>Neogit kind=split push<CR>")
|
||||
vim.keymap.set("n", "<leader>/", "<cmd>ToggleTerm<CR>")
|
||||
vim.keymap.set("n", "<leader>tt", "<cmd>ToggleTerm direction=float<CR>")
|
||||
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>;", "<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>fb", "<cmd>Telescope buffers<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>")
|
||||
vim.keymap.set("n", "<leader>fp", "<cmd>Telescope projects<cr>")
|
||||
|
||||
-- Neotree
|
||||
vim.keymap.set("n", "<leader>n", "<cmd>Neotree toggle<cr>")
|
||||
vim.keymap.set("n", "<leader>\\", "<cmd>Neotree reveal<cr>")
|
||||
|
||||
-- Aerial
|
||||
vim.keymap.set("n", "<leader>a", "<cmd>AerialToggle!<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>")
|
||||
|
||||
-- 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>")
|
Loading…
Reference in a new issue