31 lines
1.4 KiB
Lua
31 lines
1.4 KiB
Lua
return {
|
|
-- ToggleTerm (Floating & Bottom Terminal)
|
|
{
|
|
"akinsho/toggleterm.nvim",
|
|
version = "*",
|
|
config = function()
|
|
-- shell = "fish": the embedded terminal launches fish instead of
|
|
-- your login shell. fish has grey inline "ghost text" suggestions
|
|
-- built in (paths, directory contents, and history) with zero
|
|
-- config -- accept with -> or <End>. This only affects terminals
|
|
-- opened from Neovim; your system login shell is untouched.
|
|
--
|
|
-- Windows: fish has no native Windows build, so the terminal
|
|
-- launches PowerShell 7 (pwsh) instead -- it has the same kind of
|
|
-- grey inline prediction (PSReadLine, from command history) on by
|
|
-- default -- falling back to Windows PowerShell 5.1 if pwsh isn't
|
|
-- installed. setup_neovim.ps1 installs pwsh.
|
|
local shell = "fish"
|
|
if vim.fn.has("win32") == 1 then
|
|
shell = vim.fn.executable("pwsh") == 1 and "pwsh" or "powershell"
|
|
end
|
|
require("toggleterm").setup({
|
|
shell = shell,
|
|
})
|
|
vim.keymap.set('n', '<leader>tf', '<cmd>ToggleTerm direction=float<cr>', { desc = "Floating Terminal" })
|
|
vim.keymap.set('n', '<leader>th', '<cmd>ToggleTerm direction=horizontal<cr>', { desc = "Bottom Terminal" })
|
|
vim.keymap.set('n', '<leader>tv', '<cmd>ToggleTerm direction=vertical size=40<cr>', { desc = "Side Terminal" })
|
|
end,
|
|
},
|
|
}
|