From 0e9f926c39dda3a371c0c78522401e36a1a3866a Mon Sep 17 00:00:00 2001 From: Arkaprabha Chakraborty Date: Fri, 29 Mar 2024 19:33:45 +0530 Subject: [PATCH] Changes to be committed: - Change toggleterm direction to horizontal - Add a function to get size of the terminal based on the direction --- lua/plugins.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lua/plugins.lua b/lua/plugins.lua index 703798e..aa8e547 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -59,10 +59,17 @@ local plugins = { "akinsho/toggleterm.nvim", version = "*", opts = { + size = function(term) + if term.direction == "horizontal" then + return 24 + elseif term.direction == "vertical" then + return vim.o.columns * 0.4 + end + end, open_mapping = [[]], hide_numbers = true, start_in_insert = true, - direction = "tab", + direction = "horizontal", close_on_exit = true, shell = vim.o.shell, float_opts = {