You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

17 lines
805 B

-- 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 <C-/> / <C-_>: 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" }, "<C-/>", term_open, { desc = "Terminal (Root Dir) | 99<C-/> = float" })
vim.keymap.set({ "n", "t" }, "<C-_>", term_open, { desc = "Terminal (Root Dir) | 99<C-/> = float" })