nvimdev / nvimdev/lspsaga.nvim

Show lightbulb only for cursor

Open
#1,470 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Lua
Stars
3.8k
Forks
308
PR merge metrics
No merged PRs in 30d

Description

Is your feature request related to a problem? Please describe.
The code action from lspsaga is cursor-based rather than line based but the lightbulb is visible for the entire line which causes a scenario where you see the light bulb, but code action is available.

Describe the solution you'd like
A setting (boolean) for lightbulb named something like "cursor_only" that when set to false acts the same as now, but when set to true, only shows the lightbulb if a code action is available (based on cursor rather than entire line)

Describe alternatives you've considered
N/A

Additional context
Maybe a diff feature request, but having a list of patterns for blacklisting code actions, and if all code actions are "blacklisted" then don't display the lightbulb (that way, u can only show a bulb when "important" code actions are available), also can work with a whitelist

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing where the lightbulb is rendered and how lspsaga checks code-action availability for the cursor versus the whole line. Define the new boolean setting alongside the existing lightbulb settings, then verify that enabling it hides the bulb when no cursor-specific action exists while preserving current behavior when disabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
devtools
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.