grafana / grafana/jsonnet-language-server
Command: Evaluate at position
- Dominant language
- Go
- Stars
- 223
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Description
The language server currently has the `evaluateFile` and `evaluateExpression` commands. Another very useful one, but much harder to implement, is `evaluateAtPosition`. This could allow a user to check the value of `self`, or a local at any location
Since locals cannot be queried, we could define temporary attributes at runtime, like this:
```
{
local my_key = 'test',
temp:: my_key, // Line added at eval time (not defined by the user)
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading the existing evaluateFile and evaluateExpression language-server commands and determine how an evaluateAtPosition request could access self or locals. Done means the command can evaluate the value at a requested position, including a local variable, with the runtime approach resolved and tested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100