From e292b5bd5ba856925d7422f8d251970abafc59b5 Mon Sep 17 00:00:00 2001 From: triethyl Date: Mon, 11 Aug 2025 18:53:49 -0400 Subject: neovim: automatic split resizing and cleanup --- pkgs/custom-neovim/config/lua/mappings.lua | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'pkgs/custom-neovim/config/lua/mappings.lua') 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", "bg", "Open buffer live grep picker", ":lua Snacks.picker.gr -- Windows mapkey("n", "w", "Manage windows", "") +mapkey("n", "S", "Open new horizontally", ":new") +mapkey("n", "wS", "Open new horizontally", ":new") +mapkey("n", "V", "Open new vertically", ":vnew") +mapkey("n", "wV", "Open new vertically", ":vnew") -- Sessions mapkey("n", "m", "Manage sessions", "") @@ -88,8 +92,11 @@ mapkey("n", "Q", "Exit neovim", function() vim.cmd("qa!") end) --- Learn hjkl. --- mapkey({"n", "v"}, "", "Correct the keypress", function() print("Try pressing h instead.") end) --- mapkey({"n", "v"}, "", "Correct the keypress", function() print("Try pressing j instead.") end) --- mapkey({"n", "v"}, "", "Correct the keypress", function() print("Try pressing k instead.") end) --- mapkey({"n", "v"}, "", "Correct the keypress", function() print("Try pressing l instead.") end) +-- Dimming +mapkey("n", "u", "Toggle scope dimming", function() + if Snacks.dim.enabled then + Snacks.dim.disable() + else + Snacks.dim.enable() + end +end) -- cgit v1.2.3