diff --git a/lua/custom/mappings.lua b/lua/custom/mappings.lua index f38301e..5688e6b 100644 --- a/lua/custom/mappings.lua +++ b/lua/custom/mappings.lua @@ -214,26 +214,50 @@ M.telescope = { }, } -M.nvterm = { +M.toggleterm = { plugin = true, - - t = { - -- preserve defaults + n = { [""] = { - function() - require("nvterm.terminal").toggle "float" - end, - "Toggle floating term", + "ToggleTerm direction=float", + "toggle terminal", + }, + [""] = { + "ToggleTerm direction=float", + "toggle terminal", + }, + [""] = { + "ToggleTerm direction=tab", + "toggle terminal", + }, + [""] = { + "ToggleTerm direction=horizontal", + "toggle terminal", + }, + [""] = { + "ToggleTerm direction=vertical", + "toggle terminal", }, }, - - n = { - -- preserve defaults + t = { [""] = { - function() - require("nvterm.terminal").toggle "float" - end, - "Toggle floating term", + "ToggleTerm direction=float", + "toggle terminal", + }, + [""] = { + "ToggleTerm direction=float", + "toggle terminal", + }, + [""] = { + "ToggleTerm direction=tab", + "toggle terminal", + }, + [""] = { + "ToggleTerm direction=horizontal", + "toggle terminal", + }, + [""] = { + "ToggleTerm direction=vertical", + "toggle terminal", }, }, } @@ -280,8 +304,8 @@ M.movements = { ["#"] = { "'", "go to mark" }, -- spell - ["]s"] = { "]s", "go to next spelling mark"}, - ["[s"] = { "[s", "go to last spelling mark"}, + ["]s"] = { "]s", "go to next spelling mark" }, + ["[s"] = { "[s", "go to last spelling mark" }, }, v = { --big move diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 067366a..8d95572 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -228,6 +228,23 @@ local plugins = { }, }, }, + { + "NvChad/nvterm", + enabled = false, + }, + { + "akinsho/toggleterm.nvim", + init = function () + require("core.utils").load_mappings "toggleterm" + end, + cmd = "ToggleTerm", + opts = { + open_mapping = false, + float_opts = { + border = "curved", + }, + }, + }, } return plugins