Files
tiny-lightbulb.nvim/README.md
T
2026-04-09 14:12:24 -06:00

1.2 KiB

tiny-lightbulb.nvim

A tiny lightbulb for Neovim 0.12+. Shows a sign when LSP code actions are available on the current line.

Zero config. ~50 lines of Lua.

Features

  • Displays a 💡 in the sign column when code actions are available
  • Clears instantly on cursor move
  • Async LSP requests with stale-response handling
  • Configurable sign text, highlight, and priority
  • Works out of the box — no setup call required

Requirements

  • Neovim >= 0.12
  • At least one LSP server that supports code actions

Installation

Add to your vim.pack.add() call:

"https://github.com/swaits/tiny-lightbulb.nvim",

Done. The plugin auto-loads with sensible defaults.

Configuration

All options are optional. Call setup() only if you want to customize:

require("tiny-lightbulb").setup({
  sign = "💡",           -- sign column text
  hl = "DiagnosticWarn",  -- highlight group
  priority = 10,          -- extmark priority
})

How it works

On CursorHold, the plugin asks all attached LSP clients whether code actions exist for the current line. If any are returned, an extmark sign is placed. On CursorMoved, the sign is cleared and any in-flight LSP responses are discarded via a generation counter.

License

MIT