Skip to content

Make any Neovim Colorscheme to support for Italics and Transparency.

License

Notifications You must be signed in to change notification settings

adityastomar67/italicize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Italicize.nvim

Force Transparency and Italics support onto any Neovim Colorscheme.

License Stars Issues Last Updated

✨ Features

  • Universal Support: Works with any colorscheme by dynamically modifying highlight groups.
  • Granular Control: Toggle transparency and italics independently.
  • Persistent State: Remembers your toggle state even if you reload the theme.
  • Highly Configurable: Easily add or exclude specific syntax groups.

📦 Installation

Using lazy.nvim (Recommended)

{
  "adityastomar67/italicize",
  event = "ColorScheme", -- Load when colorscheme changes
  config = function()
    require("italicize").setup({
        transparency = true,
        italics = false,
    })
  end
}
use {
  "adityastomar67/italicize",
  config = function ()
    require("italicize").setup()
  end
}

⚙️ Configuration

You can pass a table to the setup() function to override defaults.

require("italicize").setup({
    -- Default Toggles
    transparency = false,       -- Enable transparent background by default
    italics = false,            -- Enable italics by default

    -- Exclusions (Groups to ignore)
    exclude_transparency_group = { "CursorLine", "Search" },
    exclude_italics_group = { "Type" },

    -- Overrides (Add your own groups here)
    italics_groups = { "CustomGroup", "AnotherGroup" },
    transparent_groups = { "NvimTreeNormal" }
})

Default Groups

The plugin comes pre-configured with a comprehensive list of groups for standard syntax, TreeSitter, and popular plugins (Telescope, NvimTree, GitSigns, etc.).

Click to view default Italic Groups
italics_groups = {
    "Comment",
    "Conditional",
    "Identifier",
    "SpecialChar",
    "SpecialComment",
    "String",
    "Todo",
    "CmpItemKind",
    -- TreeSitter / Modern Highlights
    "@comment",
    "@conditional",
    "@keyword",
    "@variable",
    -- ... and many more
}
Click to view default Transparent Groups
transparent_groups = {
    "Normal",
    "NormalNC",
    "NormalFloat",
    "FloatBorder",
    "LineNr",
    "SignColumn",
    "EndOfBuffer",
    "MsgArea",
    "NvimTreeNormal",
    "TelescopeNormal",
    "WhichKeyFloat",
    -- ... and many more
}

🚀 Commands

The plugin provides user commands to toggle effects on the fly.

Command Description
:TransparentToggle Toggle transparency on/off.
:TransparentEnable Force transparency on.
:TransparentDisable Force transparency off.
:ItalicsToggle Toggle italics on/off.
:ItalicsEnable Force italics on.
:ItalicsDisable Force italics off.

⌨️ Keybindings Example

You can map these commands in your init.lua for quick access:

vim.keymap.set('n', '<leader>tt', '<cmd>TransparentToggle<cr>', { desc = "Toggle Transparency" })
vim.keymap.set('n', '<leader>ti', '<cmd>ItalicsToggle<cr>', { desc = "Toggle Italics" })
Built with ❤️ for Neovim

About

Make any Neovim Colorscheme to support for Italics and Transparency.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages