mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-08-04 01:55:29 +02:00
feat(keymaps): added floating terminal
This commit is contained in:
parent
68242540cf
commit
18756a614c
2 changed files with 5 additions and 0 deletions
|
@ -88,6 +88,10 @@ if vim.fn.has("nvim-0.9.0") == 1 then
|
|||
vim.keymap.set("n", "<leader>hl", vim.show_pos, { desc = "Highlight Groups at cursor" })
|
||||
end
|
||||
|
||||
-- floating terminal
|
||||
vim.keymap.set("n", "<leader>ot", function() util.float_term(nil, { cwd = util.get_root() }) end, { desc = "Terminal (root dir)" })
|
||||
vim.keymap.set("n", "<leader>oT", function() require("lazyvim.util").float_term() end, { desc = "Terminal (cwd)" })
|
||||
|
||||
-- windows
|
||||
vim.keymap.set("n", "<leader>ww", "<C-W>p", { desc = "other-window" })
|
||||
vim.keymap.set("n", "<leader>wd", "<C-W>c", { desc = "delete-window" })
|
||||
|
|
|
@ -61,6 +61,7 @@ function M.telescope(builtin, opts)
|
|||
end
|
||||
|
||||
function M.float_term(cmd, opts)
|
||||
cmd = cmd or { vim.env.SHELL or vim.o.shell }
|
||||
opts = vim.tbl_deep_extend("force", {
|
||||
terminal = true,
|
||||
close_on_exit = true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue