From d615138d4cd00ffc635eeae84d67d61982644962 Mon Sep 17 00:00:00 2001 From: Jason Stentz Date: Mon, 1 Sep 2025 21:11:22 -0400 Subject: [PATCH] adding toggle term --- init.lua | 2 +- lazy-lock.json | 3 +++ lua/custom/plugins/init.lua | 1 + lua/custom/plugins/toggleterm.lua | 44 +++++++++++++++++++++++++++++++ 4 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 lua/custom/plugins/toggleterm.lua diff --git a/init.lua b/init.lua index a78b8195..8c8afd9d 100644 --- a/init.lua +++ b/init.lua @@ -1035,7 +1035,7 @@ require('lazy').setup({ -- This is the easiest way to modularize your config. -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, -- -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec` -- Or use telescope! diff --git a/lazy-lock.json b/lazy-lock.json index faacccd3..8392cbce 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -11,6 +11,8 @@ "mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" }, "mason.nvim": { "branch": "main", "commit": "7dc4facca9702f95353d5a1f87daf23d78e31c2a" }, "mini.nvim": { "branch": "main", "commit": "ddb70da6ec6aa896cfde87350d1e8dffb57ddef0" }, + "neo-tree.nvim": { "branch": "main", "commit": "f1deac7ecec88c28a250d890ba7bb35843e69cbd" }, + "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nvim": { "branch": "main", "commit": "30fa4d122d9b22ad8b2e0ab1b533c8c26c4dde86" }, "nvim-lspconfig": { "branch": "master", "commit": "cb4765526f7201ce4ff0c49888f80c18da614e68" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, @@ -20,5 +22,6 @@ "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, + "toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" }, "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } } diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index be0eb9d8..34bcd10a 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -2,4 +2,5 @@ -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information + return {} diff --git a/lua/custom/plugins/toggleterm.lua b/lua/custom/plugins/toggleterm.lua new file mode 100644 index 00000000..762a206c --- /dev/null +++ b/lua/custom/plugins/toggleterm.lua @@ -0,0 +1,44 @@ +return { + 'akinsho/toggleterm.nvim', + version = '*', + config = function() + require('toggleterm').setup { + size = function(term) + if term.direction == 'horizontal' then + return 15 + elseif term.direction == 'vertical' then + return vim.o.columns * 0.4 + end + end, + open_mapping = [[]], + hide_numbers = true, + shade_filetypes = {}, + autochdir = false, + shade_terminals = true, + start_in_insert = true, + insert_mappings = true, + terminal_mappings = true, + persist_size = true, + persist_mode = true, + direction = 'float', + close_on_exit = true, + clear_env = false, + shell = 'zsh', + auto_scroll = true, + float_opts = { + border = 'single', + winblend = 0, + title_pos = 'left', + }, + winbar = { + enabled = false, + name_formatter = function(term) + return term.name + end, + }, + responsiveness = { + horizontal_breakpoint = 135, + }, + } + end, +}