mirror of
https://github.com/boxpositron/absolute-vim.git
synced 2026-02-28 11:40:36 +00:00
15246a74ab004f81cacec17ab4450d0be88d0b6d
This commit adds support for the toggleterm plugin in Neovim. It introduces a new Lua file `toggleterm.lua` in the `absolute/after` directory, which configures the toggleterm plugin. It sets up key mappings to open a terminal and toggle the lazygit terminal. The `toggleterm.lua` file imports the `toggleterm` and `Terminal` modules from the toggleterm plugin. It then sets up the toggleterm plugin using the `toggle_term.setup()` function. The `lazygit` terminal is defined using the `Terminal:new()` function. It specifies the command to run (`lazygit`), the directory to run the command in (`git_dir`), and the floating window options. It also defines an `on_open` function to start insert mode and set a key mapping to close the terminal, and an `on_close` function to start insert mode. The `_LAZYGIT_TOGGLE()` function is defined to toggle the `lazygit` terminal. Key mappings are set using the `vim.api.nvim_set_keymap()` function. The `<leader>gl` mapping is set to call the `_LAZYGIT_TOGGLE()` function, and the `<C-`` mapping is set to open a terminal using the `ToggleTerm` command. Additionally, a new Lua file `toggleterm.lua` is added in the `absolute/plugins` directory, which exports the toggleterm plugin configuration. It requires the `absolute.after.toggleterm` module to configure the toggleterm plugin.
Absolute VIM Configuration
Introduction
Here's the VIM configuration I'm going to be using for most of my professional work this year. There may be changes as I discover new plugins. I intent to personalize this to my taste and coding conventions. Feel free to try it out if you fancy 😄.
Installation
git clone https://github.com/boxpositron/absolute-vim ~/.config/nvim --depth 1 && nvim
Components
Package Manager
I'm using lazy.nvim to manage all the packages. I setup the project to use the after directory as well. Lazy does not need to use this but I set it up incase you want to switch to a different package manager like packer. You'll notice I require the plugin file from after in the config function for the plugin. It's worked for me and it keeps things organized.
TODO: List out Plugins
Description
Languages
Lua
100%