From 501dfbeef474628b4604d7ba0f344366f675efb8 Mon Sep 17 00:00:00 2001 From: Natasha Moongrave Date: Wed, 4 Mar 2026 17:24:53 +0100 Subject: added toggleterm azygit setup to neovim --- modules/home/i3wm/nord-blue/nvim.nix | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'modules/home/i3wm/nord-blue/nvim.nix') diff --git a/modules/home/i3wm/nord-blue/nvim.nix b/modules/home/i3wm/nord-blue/nvim.nix index eaf9b28..35d0430 100644 --- a/modules/home/i3wm/nord-blue/nvim.nix +++ b/modules/home/i3wm/nord-blue/nvim.nix @@ -23,6 +23,7 @@ nvim-tree-lua # Tree file browser nvim-web-devicons # Icons orgmode # Obsidian.md stuff for neovim + toggleterm # Togglable terminal in Neovim { plugin = vim-startify; # Add the plugin and its coresponding config config = "let g:startify_change_to_vcs_root = 0"; @@ -130,6 +131,33 @@ -- Let treesitter handle LaTeX highlighting vim.g.vimtex_syntax_enabled = 0 + -- ToggleTerm setup + require("toggleterm").setup({ + size = 20, + open_mapping = [[]], + direction = "float", + float_opts = { + border = "rounded", + }, + }) + + -- Lazygit floating terminal + local Terminal = require("toggleterm.terminal").Terminal + + local lazygit = Terminal:new({ + cmd = "lazygit", + hidden = true, + direction = "float", + float_opts = { + border = "rounded", + }, + }) + + function _LAZYGIT_TOGGLE() + lazygit:toggle() + end + + vim.keymap.set("n", "gg", _LAZYGIT_TOGGLE, { desc = "Lazygit" }) -- Auto settings for LaTeX files vim.api.nvim_create_autocmd("FileType", { -- cgit v1.2.3