folke/twilight.nvim
folke/twilight.nvim has 1,548 GitHub stars and 29 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-08 04:18 UTC. Last push 2025-10-28.
🌅 Twilight is a Lua plugin for Neovim 0.5 that dims inactive portions of the code you're editing using TreeSitter.
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Original🌅 Twilight
Twilight is a Lua plugin for Neovim 0.5 that dims inactive portions of the code you're editing.
The plugin was heavily inspired by Limelight, but uses TreeSitter for better dimming.
Pairs well with zen-mode.

⚡️ Requirements
- Neovim >= 0.5.0
📦 Installation
Install the plugin with your preferred package manager:
lazy.nvim
-- Lua
{
"folke/twilight.nvim",
opts = {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
}
}
⚙️ Configuration
Twilight comes with the following defaults:
{
dimming = {
alpha = 0.25, -- amount of dimming
-- we try to get the foreground from the highlight groups or fallback color
color = { "Normal", "#ffffff" },
term_bg = "#000000", -- if guibg=NONE, this will be used to calculate text color
inactive = false, -- when true, other windows will be fully dimmed (unless they contain the same buffer)
},
context = 10, -- amount of lines we will try to show around the current line
treesitter = true, -- use treesitter when available for the filetype
-- treesitter is used to automatically expand the visible text,
-- but you can further control the types of nodes that should always be fully expanded
expand = { -- for treesitter, we we always try to expand to the top-most ancestor with these types
"function",
"method",
"table",
"if_statement",
},
exclude = {}, -- exclude these filetypes
}
🚀 Usage
You can manually trigger Twilight using the commands:
Twilight: toggle twilightTwilightEnable: enable twilightTwilightDisable: disable twilight
🧘 Zen Mode Integration
If you have zen-mode installed, then Twilight is activated automatically. Refer to the Zen Mode documentation to disable.
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
560,890 starspublic-apis/public-apis
A collective list of free APIs
497,126 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
442,020 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,169 stars