feat(keymaps): added floating terminal
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user