diff options
| author | triethyl <triethylammonium@pm.me> | 2025-08-11 18:53:49 -0400 |
|---|---|---|
| committer | triethyl <triethylammonium@pm.me> | 2025-08-11 18:53:49 -0400 |
| commit | e292b5bd5ba856925d7422f8d251970abafc59b5 (patch) | |
| tree | 5b6901bb5779ffcdd02814e218588d06763820bd /pkgs/custom-neovim/config/lua/mappings.lua | |
| parent | e366181a3118cb69e60845258b60ac24029fc345 (diff) | |
neovim: automatic split resizing and cleanup
Diffstat (limited to 'pkgs/custom-neovim/config/lua/mappings.lua')
| -rw-r--r-- | pkgs/custom-neovim/config/lua/mappings.lua | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/pkgs/custom-neovim/config/lua/mappings.lua b/pkgs/custom-neovim/config/lua/mappings.lua index 8648ff3..275ff27 100644 --- a/pkgs/custom-neovim/config/lua/mappings.lua +++ b/pkgs/custom-neovim/config/lua/mappings.lua @@ -38,6 +38,10 @@ mapkey("n", "<leader>bg", "Open buffer live grep picker", ":lua Snacks.picker.gr -- Windows mapkey("n", "<leader>w", "Manage windows", "<C-w>") +mapkey("n", "<C-w>S", "Open new horizontally", ":new<cr>") +mapkey("n", "<leader>wS", "Open new horizontally", ":new<cr>") +mapkey("n", "<C-w>V", "Open new vertically", ":vnew<cr>") +mapkey("n", "<leader>wV", "Open new vertically", ":vnew<cr>") -- Sessions mapkey("n", "<leader>m", "Manage sessions", "") @@ -88,8 +92,11 @@ mapkey("n", "<leader>Q", "Exit neovim", function() vim.cmd("qa!") end) --- Learn hjkl. --- mapkey({"n", "v"}, "<left>", "Correct the keypress", function() print("Try pressing h instead.") end) --- mapkey({"n", "v"}, "<down>", "Correct the keypress", function() print("Try pressing j instead.") end) --- mapkey({"n", "v"}, "<up>", "Correct the keypress", function() print("Try pressing k instead.") end) --- mapkey({"n", "v"}, "<right>", "Correct the keypress", function() print("Try pressing l instead.") end) +-- Dimming +mapkey("n", "<leader>u", "Toggle scope dimming", function() + if Snacks.dim.enabled then + Snacks.dim.disable() + else + Snacks.dim.enable() + end +end) |
