feat(nvim): add config
This commit is contained in:
42
nvim/lua/mappings.lua
Normal file
42
nvim/lua/mappings.lua
Normal file
@@ -0,0 +1,42 @@
|
||||
require "nvchad.mappings"
|
||||
|
||||
-- add yours here
|
||||
|
||||
local map = vim.keymap.set
|
||||
local ufo = require("ufo")
|
||||
|
||||
map("n", ";", ":", { desc = "CMD enter command mode" })
|
||||
|
||||
map("n", "mk", "<cmd>RustLsp moveItem up<cr>")
|
||||
map("n", "m,", "<cmd>RustLsp moveItem down<cr>")
|
||||
map("n", "rs", "<cmd>RustLsp run<cr>")
|
||||
map("n", "hh", "<cmd>RustLsp hover actions<cr>")
|
||||
map("n", "ca", "<cmd>RustLsp codeAction<cr>")
|
||||
map("n", "<C-s>", "<cmd>w!<cr>")
|
||||
map("i", "<C-s>", "<cmd>w!<cr>")
|
||||
|
||||
map("n", "<leader>sn", "<Cmd>split<cr>", { desc = "Horizontal split" })
|
||||
map("n", "<leader>sv", "<Cmd>vsplit<cr>", { desc = "Vertical split" })
|
||||
|
||||
map("n", "<leader>dr", "<cmd> DapContinue <cr>", { desc = "Continue debug" } )
|
||||
|
||||
map("n", "do", function()
|
||||
require("dapui").open()
|
||||
end, { desc = "Open DAP ui" })
|
||||
map("n", "dc", function()
|
||||
require("dapui").close()
|
||||
end, { desc = "Start or continue debug" })
|
||||
map("n", "dt", function()
|
||||
require("dapui").toggle()
|
||||
end, { desc = "Toggle DAP ui" })
|
||||
|
||||
map("n", "<F9>", "<cmd>DapContinue<cr>", { desc = "Start or continue debug" })
|
||||
|
||||
map("n", "+", "<cmd>vertical resize +5<cr>", { desc = "Increase vertical buffer" }) -- make the window biger vertically
|
||||
map("n", "-", "<cmd>vertical resize -5<cr>", { desc = "Decrease vertical buffer" }) -- make the window smaller vertically
|
||||
map("n", "_", "<cmd>horizontal resize +2<cr>", { desc = "Increase horizontal buffer" }) -- make the window bigger horizontally by pressing shift and =
|
||||
map("n", "=", "<cmd>horizontal resize -2<cr>", { desc = "Decrease horizontal buffer" }) -- make the window smaller horizontally by pressing shift and -
|
||||
|
||||
map('n', 'zR', ufo.openAllFolds)
|
||||
map('n', 'zM', ufo.closeAllFolds)
|
||||
-- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")-- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")
|
||||
Reference in New Issue
Block a user