grafana / grafana/jsonnet-language-server
required function argument handling
- Dominant language
- Go
- Stars
- 223
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Description
I have a `helper.libsonnet` file containing this:
```jsonnet
function(a, b)
{ sum: a+b }
```
I get a "Missing argument error" which is correct but quite useless, how can I give the language server a useable default without having to resort to writing that:
```jsonnet
function(a = 0, b = 0)
{ sum: a+b }
```
it works but I don't want these arguments to be optional, is there a way to do that in a way on visible to the language server maybe ?
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the missing-argument diagnostic using the helper.libsonnet example and trace how the language server handles Jsonnet function arguments. Determine whether a separate language-server hint can be provided while arguments remain required; done means the diagnostic is more useful without changing the function's required-argument behavior.
Written by the indexing model from the issue text.
Assessment
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100