From b64bb82456dc0b29e3565e1eb3fb027878628540 Mon Sep 17 00:00:00 2001 From: Taken Date: Sun, 1 Oct 2023 20:41:02 +0200 Subject: [PATCH] Replaced toggleterm with nvterm --- lua/taken/core/opts.lua | 2 +- lua/taken/plugins/nvterm.lua | 35 ++++++++++++++++++++++++++++++++ lua/taken/plugins/toggleterm.lua | 3 ++- 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 lua/taken/plugins/nvterm.lua diff --git a/lua/taken/core/opts.lua b/lua/taken/core/opts.lua index 4fd8698..34862f7 100644 --- a/lua/taken/core/opts.lua +++ b/lua/taken/core/opts.lua @@ -42,7 +42,7 @@ opt.updatetime = 50 -- windows if vim.fn.has("win32") == 1 then - o.shell = "pwsh" + o.shell = "pwsh -nologo" o.shellcmdflag = "-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;" o.shellredir = "2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode" diff --git a/lua/taken/plugins/nvterm.lua b/lua/taken/plugins/nvterm.lua new file mode 100644 index 0000000..e17b895 --- /dev/null +++ b/lua/taken/plugins/nvterm.lua @@ -0,0 +1,35 @@ +return { + "NvChad/nvterm", + keys = { + { + "", + function() + require("nvterm.terminal").toggle("float") + end, + desc = "Open float terminal", + }, + { + "", + function() + require("nvterm.terminal").toggle("horizontal") + end, + desc = "Open hortizontal terminal", + }, + }, + config = function() + local nvterm = require("nvterm") + + nvterm.setup({ + terminals = { + type_opts = { + float = { + row = 0.1, + col = 0.1, + width = 0.8, + height = 0.8, + }, + }, + }, + }) + end, +} diff --git a/lua/taken/plugins/toggleterm.lua b/lua/taken/plugins/toggleterm.lua index 937cce8..6ef0cc8 100644 --- a/lua/taken/plugins/toggleterm.lua +++ b/lua/taken/plugins/toggleterm.lua @@ -1,9 +1,10 @@ return { "akinsho/toggleterm.nvim", + enabled = false, version = "*", cmd = "ToggleTerm", keys = { - { "bt", ":ToggleTerm direction=float ", desc = "Open terminal" }, + { "bt", ":ToggleTerm direction=float ", desc = "Open terminal" }, { "bT", ":ToggleTerm direction=horizontal ", desc = "Open horizontal terminal split" }, }, config = function()