Skip to content

Make lines stand out by putting them in the spotlight. ✨

License

Notifications You must be signed in to change notification settings

TymekDev/spotlight.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spotlight.nvim

Don't lose the audience when screen sharing—make things stand out by putting them in the spotlight.

✨ Demo

spotlight.nvim.demo.mp4

🛠️ Installation

spotlight.nvim has a default plugin spec—see lazy.lua. This spec has a set default mappings and lazy loading enabled!

---@module "lazy"
---@type LazySpec
{
  "TymekDev/spotlight.nvim"
  ---@module "spotlight"
  ---@type spotlight.ConfigPartial
  opts = {},
}

Tip

Annotations above are optional. Use lazydev.nvim to get completions based on them.

⚙️ Configuration

All configurable settings with their defaults:

require("spotlight").setup({
  -- Should the spotlights have their ordinal number displayed in the sign column?
  -- Every buffer has its own counter.
  count = true,

  -- The highlight group applied to the spotlighted lines
  hl_group = "Visual",
})

🚀 Usage

:Spotlight

Put a range of lines in the spotlight! ✨

  • :Spotlight - puts the current line
  • :<range>Spotlight - puts the provided range as one
  • :Spotlight count=false hl_group=SpellBad - overrides the config

:SpotlightClear

Remove a range of lines, a buffer, or everything from the spotlight. ♻️

  • :SpotlightClear - clears everything overlapping with the current line
  • :<range>SpotlightClear - clears everything overlapping with the provided range
  • :Spotlight Clear buffer - clears the entire buffer and resets the counter
  • :Spotlight Clear global - clears every buffer and resets their counters

💡 Inspiration

I got Highlight specific lines linked by Damian. Then I nerd sniped myself into converting the snippet to Lua. Then into extending it. Then into using extmarks. Then into turning the script into a plugin. Then...

About

Make lines stand out by putting them in the spotlight. ✨

Topics

Resources

License

Stars

Watchers

Forks

Languages