### Initialize term-transparency.nvim with setup() Source: https://context7.com/iniyankanmani/term-transparency.nvim/llms.txt Configures the plugin with terminal-specific settings, transparency levels, and callback functions. It initializes the state management system and registers the toggle command. ```lua require("term_transparency").setup({ transparency_value = 0.80, term = { kitty = { enabled = true, socket = "/tmp/kitty.sock", }, wezterm = { enabled = false, }, }, notifications = { enabled = true, }, on_transparency_change = function() if vim.g.is_transparent then vim.cmd("highlight Normal guibg=NONE ctermbg=NONE") else vim.cmd.colorscheme("tokyonight-night") end end, }) ``` -------------------------------- ### Install term-transparency.nvim with lazy.nvim Source: https://github.com/iniyankanmani/term-transparency.nvim/blob/main/README.md This code snippet demonstrates how to install the term-transparency.nvim plugin using the lazy.nvim package manager for Neovim. It includes a placeholder for any additional transparency-related plugin dependencies. ```lua { "IniyanKanmani/term-transparency.nvim", dependencies = { -- Add your transparency-related plugin dependencies here }, } ``` -------------------------------- ### Configure Kitty terminal for transparency support Source: https://context7.com/iniyankanmani/term-transparency.nvim/llms.txt Sets the required Kitty configuration to allow remote control and dynamic background opacity adjustments via the plugin. ```bash dynamic_background_opacity yes allow_remote_control yes listen_on unix:/tmp/kitty.sock background_opacity 0.80 ``` -------------------------------- ### Toggle transparency via command and keybindings Source: https://context7.com/iniyankanmani/term-transparency.nvim/llms.txt Demonstrates how to trigger the transparency toggle command programmatically or via user-defined keymaps. It also shows how to check the current state using the global variable. ```lua vim.cmd("ToggleTermTransparency") vim.keymap.set("n", "bt", "ToggleTermTransparency", { desc = "Toggle Terminal Transparency" }) if vim.g.is_transparent then print("Transparency is ON") else print("Transparency is OFF") end ``` -------------------------------- ### Configure WezTerm for transparency support Source: https://context7.com/iniyankanmani/term-transparency.nvim/llms.txt Configures WezTerm to enable automatic configuration reloading, allowing the plugin to apply transparency changes dynamically. ```lua local wezterm = require("wezterm") local config = wezterm.config_builder() config.automatically_reload_config = true config.window_background_opacity = 0.8 config.macos_window_background_blur = 25 return config ``` -------------------------------- ### Configure term-transparency.nvim with lazy.nvim Source: https://context7.com/iniyankanmani/term-transparency.nvim/llms.txt This snippet demonstrates the lazy.nvim plugin specification for term-transparency.nvim. It includes dependency management, option configuration for terminal backends, and a callback function to synchronize theme settings when transparency is toggled. ```lua return { { "IniyanKanmani/term-transparency.nvim", dependencies = { "folke/tokyonight.nvim", "nvim-lualine/lualine.nvim", }, event = "VimEnter", priority = 1000, opts = { transparency_value = 0.80, term = { kitty = { enabled = true, socket = "/tmp/kitty.sock", }, wezterm = { enabled = false, }, }, notifications = { enabled = true, }, on_transparency_change = function() require("tokyonight").setup({ transparent = vim.g.is_transparent, styles = { sidebars = vim.g.is_transparent and "transparent" or "dark", floats = vim.g.is_transparent and "transparent" or "dark", }, }) vim.cmd.colorscheme("tokyonight-night") end, }, config = function(_, opts) require("term_transparency").setup(opts) vim.keymap.set( "n", "bt", "ToggleTermTransparency", { desc = "Toggle Terminal Transparency" } ) end, }, } ``` -------------------------------- ### Utilize global transparency state variable Source: https://context7.com/iniyankanmani/term-transparency.nvim/llms.txt This snippet shows how to consume the global vim.g.is_transparent variable to create conditional logic. It demonstrates creating a mode indicator for a statusline and applying custom highlight groups when transparency is active. ```lua -- Use in statusline configuration local function get_mode_indicator() return vim.g.is_transparent and "󰂵 " or "󰂺 " end -- Conditional highlight groups vim.api.nvim_create_autocmd("ColorScheme", { callback = function() if vim.g.is_transparent then vim.api.nvim_set_hl(0, "Normal", { bg = "NONE" }) vim.api.nvim_set_hl(0, "NormalFloat", { bg = "NONE" }) vim.api.nvim_set_hl(0, "SignColumn", { bg = "NONE" }) end end, }) ``` -------------------------------- ### Configure term-transparency.nvim Default Options Source: https://github.com/iniyankanmani/term-transparency.nvim/blob/main/README.md This Lua code configures the default options for the term-transparency.nvim plugin. It allows setting the transparency value for terminals, enabling/disabling specific terminal emulators like Kitty and WezTerm, managing notifications, and defining a callback function for transparency changes. ```lua require("term_transparency").setup({ -- terminal emulators settings term = { transparency_value = 0.80, -- terminal emulators settings kitty = { enabled = false, socket = "/tmp/kitty.sock", -- socket that kitty listens to }, wezterm = { enabled = false, }, }, -- notification settings notifications = { enabled = true, }, -- callback function to be triggered when transparency changes on_transparency_change = function() end, }) ``` -------------------------------- ### Set Basic Keybinding for Toggling Terminal Transparency Source: https://github.com/iniyankanmani/term-transparency.nvim/blob/main/README.md This Lua code snippet defines a basic keybinding in Neovim to toggle terminal transparency. Pressing the leader key followed by 'bt' will execute the `:ToggleTermTransparency` command. ```lua vim.keymap.set( "n", "bt", "ToggleTermTransparency", { desc = "Toggle Terminal Transparency" }) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.