X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/28d0b9c4149865ed24e125ecf5a75c114aff9c85..11b9e4b2c7692dd5b3f645f2257057c676063cdf:/nvim/lua/config/keymaps.lua diff --git a/nvim/lua/config/keymaps.lua b/nvim/lua/config/keymaps.lua index 80a976a..a0285ce 100644 --- a/nvim/lua/config/keymaps.lua +++ b/nvim/lua/config/keymaps.lua @@ -75,10 +75,9 @@ vim.keymap.set("n", "[w", diagnostic_goto(false, "WARN"), { desc = "Prev Warning -- stylua: ignore start -- toggle options -vim.keymap.set("n", "uf", Util.format.toggle, { desc = "Toggle format on Save" }) -vim.keymap.set("n", "ud", Util.toggle.diagnostics, { desc = "Toggle Diagnostics" }) +vim.keymap.set("n", "ud", Snacks.toggle.diagnostics, { desc = "Toggle Diagnostics" }) local conceallevel = vim.o.conceallevel > 0 and vim.o.conceallevel or 3 -vim.keymap.set("n", "uc", function() Util.toggle("conceallevel", false, {0, conceallevel}) end, { desc = "Toggle Conceal" }) +vim.keymap.set("n", "uc", function() Snacks.toggle("conceallevel", false, {0, conceallevel}) end, { desc = "Toggle Conceal" }) -- highlights under cursor if vim.fn.has("nvim-0.9.0") == 1 then @@ -87,6 +86,15 @@ end -- floating terminal -- TODO: I prefer a split buffer for terminal, need to review how to make this more vim-like -local lazyterm = function() LazyVim.terminal(nil, { cwd = LazyVim.root() }) end +local lazyterm = function() LazyVim.terminal(nil, {}) end vim.keymap.set("n", "ft", lazyterm, { desc = "Terminal (Root Dir)" }) vim.keymap.set("n", "fT", function() LazyVim.terminal() end, { desc = "Terminal (cwd)" }) + +-- Terminal Mappings +vim.keymap.set("t", "", "", { desc = "Enter Normal Mode" }) +vim.keymap.set("t", "", "wincmd h", { desc = "Go to Left Window" }) +vim.keymap.set("t", "", "wincmd j", { desc = "Go to Lower Window" }) +vim.keymap.set("t", "", "wincmd k", { desc = "Go to Upper Window" }) +vim.keymap.set("t", "", "wincmd l", { desc = "Go to Right Window" }) +vim.keymap.set("t", "", "close", { desc = "Hide Terminal" }) +vim.keymap.set("t", "", "close", { desc = "which_key_ignore" })