aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2023-07-21 03:48:33 +0200
committersrdusr <trevorgray@srdusr.com>2023-07-23 13:43:29 +0200
commit5d7b7429db2afc72f2d0db36e576013bd5f4502a (patch)
tree13f780622d82a2a48bef28e558ab917ba5517933
parentd2997ed0f1d0e0e597913d7df7caf3f0fb739113 (diff)
downloaddotfiles-5d7b7429db2afc72f2d0db36e576013bd5f4502a.tar.gz
dotfiles-5d7b7429db2afc72f2d0db36e576013bd5f4502a.zip
Changed term to horizontal
-rw-r--r--lua/plugins/toggleterm.lua43
1 files changed, 30 insertions, 13 deletions
diff --git a/lua/plugins/toggleterm.lua b/lua/plugins/toggleterm.lua
index 2146dc3..d5f872f 100644
--- a/lua/plugins/toggleterm.lua
+++ b/lua/plugins/toggleterm.lua
@@ -15,34 +15,37 @@ toggleterm.setup({
--autochdir = true,
hide_numbers = true,
shade_filetypes = {},
- shade_terminals = false,
+ shade_terminals = true,
shading_factor = 1,
start_in_insert = true,
insert_mappings = true,
persist_size = true,
- direction = "float",
+ --direction = "float",
--direction = "vertical",
- --direction = "horizontal",
+ direction = "horizontal",
close_on_exit = true,
shell = vim.o.shell,
highlights = {
-- highlights which map to a highlight group name and a table of it's values
-- NOTE: this is only a subset of values, any group placed here will be set for the terminal window split
- Normal = {
- background = "#000000",
- },
+ --Normal = {
+ -- background = "#000000",
+ --},
+ Normal = { guibg = 'Black', guifg = 'DarkGray' },
+ FloatBorder = { guibg = 'Black', guifg = 'DarkGray' },
+ NormalFloat = { guibg = 'Black' },
--float_opts = {
-- border = as.style.current.border,
-- winblend = 3,
--},
- size = function(term)
- if term.direction == 'horizontal' then
- return 15
- elseif term.direction == 'vertical' then
- return math.floor(vim.o.columns * 0.4)
- end
- end,
},
+ size = function(term)
+ if term.direction == 'horizontal' then
+ return 7
+ elseif term.direction == 'vertical' then
+ return math.floor(vim.o.columns * 0.4)
+ end
+ end,
float_opts = {
width = 70,
height = 15,
@@ -152,3 +155,17 @@ local python = Terminal:new({ cmd = "python", hidden = true })
function _PYTHON_TOGGLE()
python:toggle()
end
+
+function Gh_dash()
+Terminal:new({
+ cmd = 'gh dash',
+ hidden = true,
+ direction = 'float',
+ on_open = float_handler,
+ float_opts = {
+ height = function() return math.floor(vim.o.lines * 0.8) end,
+ width = function() return math.floor(vim.o.columns * 0.95) end,
+ },
+})
+ Gh_dash:toggle()
+end