-- Keymaps are automatically loaded on the VeryLazy event -- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua -- Add any additional keymaps here -- Override LazyVim's / : count 99 opens the floating terminal, -- everything else stays native (bottom terminal at project root). -- Both keys are mapped because terminals differ in which code Ctrl+/ sends. local function term_open() if vim.v.count == 99 then require("config.terminal").open_float() else Snacks.terminal.focus(nil, { cwd = LazyVim.root() }) end end vim.keymap.set({ "n", "t" }, "", term_open, { desc = "Terminal (Root Dir) | 99 = float" }) vim.keymap.set({ "n", "t" }, "", term_open, { desc = "Terminal (Root Dir) | 99 = float" })