Go Rust Jsonnet Language Server
This is a jsonnet language server using the go-jsonnet implementation to generate the AST and evaluate jsonnet code
For a small list of example videos head to the Showcase page.
This repository contains 3 components:
| Component | Description |
|---|---|
| grustonnet-ls | The language server |
| grustonnet-lint | Runs the diagnostics on the given files |
| grustonnet-debugger | A jsonnet debugger using DAP |
Roadmap
- [-] Completion
- Global completion
- Index completion
- Value preview
- Make the Object preview pretty
- [-] Complete “everything”
- Find the remaining cases where completion does not work/tries to complete the wrong node
- Stdlib
- [-] Advanced Stdlib completion
- extVar completion
- Return values
- Function parameters from std.map
- Complete Loops
- Use
std.mapfor loops
- Use
- All jsonnet imports
- Properly handle completion if “/” is already in the string
- self
- super
- Fix super not working if it never had an index
- [-] Keyword completion
- Only complete if valid
- Add missing keywords
- [-] Conditionals
- Actually evaluate the condition
- Default parameters
- Builder pattern
- Check extremely complex patterns
- Array access
- Unused function arguments
- Semantic tokens
- [-] Inlay Hints
- Function parameters
- Only update if needed
- Indices
- Name after long objects
- Function parameters
- Goto definition
- Goto file from import string
- Can goto everything we can complete
- Find reference
- Import strings
- Can find references for all identifiers we can goto
- Rename
- Rename imports if file is renamed
- Rename file if import is renamed
- Can rename all identifiers we can find the reference of
- Signature Help
- Docsonnet support
- How to handle the license issues? Docsonnet does not have an open source license
- Just evaluate it
- Handle the stdlib the same as docsonnet?
- Signature help parameters
- How to handle the license issues? Docsonnet does not have an open source license
- [-] AST repair
- Commands
- Evaluate file
- Missing LSP features
- Code actions
- Code Lense?
- Hover
- Document highlight
- Document/Workspace symbols
- Folding
- Call hierachie
- File operation support for automatic refactoring (like renaming imports)
- Improve performance
- Test rust2go mem
- More multithreading
- More tests
- Fix ignored tests
- (Major) Code cleanup
- Once the prototyping phase is over
Known Issues
- (Go)-Jsonnet bugs
- If you import
foo.libsonnetand there is also afoo.libsonnetin the current working directory, evaluating the snippet will result in a diagnostic error- To reproduce
cat mydir/bar.jsonnet | jsonnet --jpath mydir -
- To reproduce
- If there is a circular dependency go-jsonnet emits a strange error
- If you import
- Eval diagnostics are always use the state from disk and not from memory
Jsonnet Quirks
tailstrict- not part of the spec apart from the reserved keyword
- no documentation at all
- in
foo(myArg()) tailstrictforces myArg to be evaluated before the body, even if it is unused