mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-08-30 06:40:07 +02:00
feat(root): customizable root detection and :LazyRoot
command
This commit is contained in:
parent
5538ab2d64
commit
171a843edf
6 changed files with 126 additions and 38 deletions
|
@ -115,7 +115,7 @@ if vim.lsp.inlay_hint then
|
|||
end
|
||||
|
||||
-- lazygit
|
||||
map("n", "<leader>gg", function() Util.terminal({ "lazygit" }, { cwd = Util.root.get(), esc_esc = false, ctrl_hjkl = false }) end, { desc = "Lazygit (root dir)" })
|
||||
map("n", "<leader>gg", function() Util.terminal({ "lazygit" }, { cwd = Util.root(), esc_esc = false, ctrl_hjkl = false }) end, { desc = "Lazygit (root dir)" })
|
||||
map("n", "<leader>gG", function() Util.terminal({ "lazygit" }, {esc_esc = false, ctrl_hjkl = false}) end, { desc = "Lazygit (cwd)" })
|
||||
|
||||
-- quit
|
||||
|
@ -128,7 +128,7 @@ map("n", "<leader>ui", vim.show_pos, { desc = "Inspect Pos" })
|
|||
map("n", "<leader>L", Util.changelog, {desc = "LazyVim Changelog"})
|
||||
|
||||
-- floating terminal
|
||||
local lazyterm = function() Util.terminal(nil, { cwd = Util.root.get() }) end
|
||||
local lazyterm = function() Util.terminal(nil, { cwd = Util.root() }) end
|
||||
map("n", "<leader>ft", lazyterm, { desc = "Terminal (root dir)" })
|
||||
map("n", "<leader>fT", function() Util.terminal() end, { desc = "Terminal (cwd)" })
|
||||
map("n", "<c-/>", lazyterm, { desc = "Terminal (root dir)" })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue