feature: Statusline: Get current scope name
- Dominant language
- Lua
- Stars
- 716
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Description
### Did you check the docs?
- [x] I have read the Grapple docs
### Is your feature request related to a problem? Please describe.
I want to show the current scope in my heirline config
### Describe the solution you'd like
If I could get scope name from something like `require("grapple").scope_name()`, similar to `require("grapple").name_or_index()`
Then I could define heirline block like:
```lua
local GrappleBlock = {
condition = function()
return package.loaded["grapple"] and require("grapple").exists()
end,
hl = {
fg = colors.springBlue,
italic = true,
},
provider = function()
local g = require("grapple")
return ("%s: %s"):format(g.scope_name(), g.statusline())
end
}
```
### Describe alternatives you've considered
Read documentation and looked at code
### Additional context
_No response_
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading the public require("grapple") API, especially name_or_index() and statusline(), and search for where the current scope is already resolved. Add scope_name() so it returns the current scope name and supports the statusline configuration shown in the issue. Verify the exported function in Neovim using the example call.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100