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
Changelog
[unreleased]
🚀 Features
- (resolve) Support resolving number comparisons (aa9c2ca)
- (inlay) Add inlay hints for indices. This should be the last missing feature from the old language server (0267a17)
- (lsp) Handle commands in a different thread to prevent blocking the server (786359f)
- (lsp) Add did_save function (043f18b)
🐛 Bug Fixes
- (inlay) Don’t show the index inlay for an apply (886a746)
- (format) Fix formatting with characters that are larger than 1 byte (0c4a2a1)
- (references) Properly get the identifier with wider utf-8 chars (dab6f28)
- (sync) Enable full-sync to prevent errors with wider characters (18682d4)
- (sync) Properly handle a full sync (2c42988)
- (inlay) Trim index inlay hints to not show any ^@ or similar (993413b)
🚜 Refactor
- (node) Actually use the enums for the types instead of i32 (332a459)
- (node) Make node stack more generic (787ddf4)
- (node) Move node stack to its own crate (95ba38c)
- (cst) Move get_node_at to CstNodeHelper trait (9937a84)
- (uri) Move URI helper to the utils crate (f68f94f)
📚 Documentation
🧪 Testing
⚙️ Miscellaneous Tasks
- (github) Fix tag name for building docker images (49deda0)
- (docker) Remove obsolete docker file (b95ee3d)
- (renovate) Enable lockfile maintenance for nix and disable gihub action updates (4be67b3)
- (renovate) Fix renovate schedule (d731693)
- (lint) Fix lint of future clippy version (e6938ed)
- (nix) Use mksteps from nix-actions (52728e7)
📦 Dependencies
- (deps) Cleanup cargo dependencies (2e4c647)
- (deps) Move shared dependencies to the workspace config (e9f46cb)
- (deps) Add cleaned up cargo.lock (7f5ddfb)
- (deps) Remov unused dependencies from node-stack crate (856a181)
- (deps) Update rust crate clap to v4.6.0 (2d2c72a)
- (deps) Update rust crate serde_with to v3.18.0 (c94c601)
- (deps) Update rust crate tree-sitter to v0.26.7 (ee6b9da)
- (deps) Update rust crate htmd to v0.5.1 (bff7be0)
- (deps) Update github.com/ihciah/rust2go digest to 6f06b06 (6947a6a)
- (deps) Update rust2go output hash (cc897ec)
- (deps) Update flake (ad19a5b)
- (deps) Update rust crate htmd to v0.5.2 (67e38a4)
- (deps) Update flake inputs (367f559)
- (deps) Update module github.com/google/go-jsonnet to v0.22.0 (bb36b84)
- (deps) Update to jsonnet 0.22 (a6e6a04)
- (deps) Update rust crate htmd to v0.5.3 (c39a287)
- (deps) Update rust crate env_logger to v0.11.10 (4d88d82)
- (deps) Update flake (625b939)
- (deps) Update flake (475f911)
[0.4.2] - 2026-03-06
🐛 Bug Fixes
- (completion) Add missing math functions to the std completion (9f16188)
⚙️ Miscellaneous Tasks
- (github) Remove duplicate TAG variable (18beb5b)
- (ai) Add agents.md to (hopefully) prevent AI slop (ce272f7)
- (github) Move cachix job to build pipeline (d9164ae)
- (nix) Simplify envrc for nix (5ca4704)
📦 Dependencies
- (deps) Update rust crate tokio to v1.50.0 (50a0dff)
- (deps) Update rust crate quote to v1.0.45 (341ef29)
[0.4.1] - 2026-03-02
🚀 Features
- (linter) Add linter to show unknown variables (3c9d315)
🐛 Bug Fixes
- (diagnostics) Disable shadow diagnostics by default since it still has issues (e6e1e92)
- (linter) Disable missbehaving linter per default (52415c7)
- (definition) Fix definition with multiple asserts (db71c33)
🧪 Testing
- (definition) Add failing test with double assert (abd8e41)
⚙️ Miscellaneous Tasks
- (github) Add ci for pushing to cachix (c184c55)
- (nix) Import all nix modules automatically (c3c981e)
- (github) Build cachix action using nix (badba68)
- (github) Use nix for docs action (0e61432)
- (github) Use nix for clippy action (0a4b8e9)
- (github) Use nix for merge request action (57e4de8)
- (github) Build container using nix (5844d78)
- (github) Make the test reproducible by using Nix (except on Windows of course) (49e2239)
- (github) Generate release pipeline as well (459ef5f)
- (github) Cleanup actions, use script for compression, and use tree import (dfa8c4f)
- (github) Define the remaining packages at the top of the file (5c62f36)
- (github) Pin all actions by hash (e8700e0)
📦 Dependencies
- (deps) Update dependency asciinema-player to v3.15.0 (7efe421)
- (deps) Update rust crate clap to v4.5.60 (5cb425d)
- (deps) Update rust crate anyhow to v1.0.102 (1fdc1aa)
- (deps) Update rust crate syn to v2.0.117 (31e77d7)
- (deps) Update rust crate strum to 0.28.0 (0717847)
- (deps) Update rust crate serde_with to v3.17.0 (d7195cf)
- (deps) Update dependency asciinema-player to v3.15.1 (1b9154d)
- (deps) Update rust crate tree-sitter to v0.26.6 (f02339b)
[0.4.0] - 2026-02-18
🚀 Features
- (debugger) Add more debug derives and properly print json errors (6a59d2c)
- (debugger) Add option to disable log timestamps (a38258c)
- (debugger) Ensure self is part of the variables (e572787)
- (debugger) Add experimental feature for evaluation (71ef376)
- (debugger) Ensure to always send $, self, and super in variables (ebbde5b)
🐛 Bug Fixes
- (debugger) Replace empty objects with null (aef6467)
- (debugger) Send stack in the correct order (1ad2545)
- (debugger) Properly shut down the debugger if the client disconnects (c1da41f)
- (debugger) Properly send error messages to the client (1401a53)
- (debugger) Remove old debug value (a8497d4)
- (debugger) Update go-jsonet to fix display of objects (c47c41e)
- (cache) Properly set files as loaded by the lsp if they were loaded manually before (22d36a4)
🚜 Refactor
- (debugger) Slim down main.rs file (4489777)
- (diagnostics) Use AtomicBool instead of RwLock (841721d)
- (debugger) Add default implementation for all DAP types (18d524a)
- (debugger) Use default implementation for some dap types (5cdde72)
⚙️ Miscellaneous Tasks
- (cliff) Fix changelog commit links (2d15aa1)
- (cliff) Add section for dependency updates (96a6168)
- (nix) Update go dependencies hash (2bdac43)
- (nix) Update go hash (e3bf32c)
- (nix) Allow to build an image using Nix (e962c3d)
- (nix) Fix documentation flake (374bd3a)
- (nix) Add git-cliff to packages (75b8669)
- (nix) Reduce the number of relative paths (d2eff40)
- (nix) Switch to flake-parts (2ed0cc4)
- (nix) Move docs flake to flake-parts (c417a62)
- (nix) Add more container targets (26ba146)
- (github) Use a fixed nightly version (d3e5808)
- (github) Fix compiling tarpauling and lock versions (e24a1fb)
- (nix) Fix container targets (f36ed5b)
- (readme) Update readme (e9358e0)
📦 Dependencies
- (deps) Update rust crate syn to v2.0.116 (c2d0670)
💼 Other
- (release) Enable lto and strip binaries for release builds (1cf5874)
[0.3.1] - 2026-02-15
⚙️ Miscellaneous Tasks
- (github) Replace AI action and package all binaries in the release (cf685be)
- (cliff) Add space before commit link (e974041)
[0.3.0] - 2026-02-15
🚀 Features
- (completion) Enable fold functions again (0eced5f)
- (completion) Support completing the first object in a std.map function (0d8f751)
- (completion) Add support for completing the std.map parameter from vars etc. as well (2fc3ff1)
- (debugger) Implement an experimental jsonnet debugger (a8bd44f)
- (debugger) Add variable lookup (a64a351)
- (debugger) Add next/step_over support (59d7625)
- (debugger) Add support for extvar and extcode (b5e423a)
- (AST) Make AST generation way more robust e.g. with missing vars (d5b1ef3)
🐛 Bug Fixes
- (crash) Check the stack size during completion to avoid crashes due to overflows (6448512)
- (references) Fix references for variables that are references in a different field that has an assert (542a2cc)
- (diagnostics) Only start sending diagnostics after the initialization is done (c5ce87e)
- (rust2go) Copy format options to the bridge again to fix rust2go generation (c12edd2)
- (debugger) Exit once jsonnet is finished (ace5847)
- (debugger) Send proper stop event reason (b0b74e6)
- (debugger) Properly clear breakpoints (0b9e6d6)
🚜 Refactor
- (errors) Add a wrapped error for std calls to get better error messages (75b0c96)
- (command) Use enum for commands and check for param length (291fc8d)
- Fix all clippy warnings (350ea4a)
- (server) Replace match with ? (b47a79c)
- (commands) Generate command list from enum (cb9f16a)
- (go) Use unkeyed format options so ensure all keys are set (94a40d3)
⚡ Performance
- (diagnostics) Reduce the time the diagnostics queue is locked (15483ed)
🧪 Testing
⚙️ Miscellaneous Tasks
- (github) Only add the current changelog to the release (1c3ecb5)
- (dev) Switch from pre-commit to prek (d9750f3)
- (build) Fix flake go output hash (ab1dfab)
- (nix) Update build inputs (ea12e13)
- (cliff) Show deps log and fix commit link (9f0d4c1)
- (github) Run make clippy in the pipeline (db99916)
- (nix) Add rust2go-cli to flake (463b61f)
- (make) Add target to generate rust2go (b9f0493)
- (github) Add job to check for generated files (370b626)
- (nix) Fix go vendor hash (880e9af)
📦 Dependencies
- (deps) Update rust crate proc-macro2 to v1.0.106 (632eaff)
- (deps) Update rust crate regex to v1.12.3 (c6c7417)
- (deps) Update rust crate rust2go to v0.4.3 (ccac17a)
- (deps) Update module github.com/stretchr/testify to v1.11.1 (c513c45)
- (deps) Update rust crate tree-sitter to 0.26.0 (3c069d6)
- (deps) Update rust crate syn to v2 (41f6822)
- (deps) Update rust crate reqwest to v0.13.2 (6f50e94)
- (deps) Update rust crate rand to 0.10.0 (23acb99)
- (deps) Update rust crate clap to v4.5.58 (75b2903)
- (deps) Update rust crate env_logger to v0.11.9 (2fba8f3)
- (deps) Update rust crate syn to v2.0.115 (2b20baa)
- (deps) Update flake (119b8f2)
- (deps) Update dependency asciinema-player to v3.14.15 (6ef91e7)
💼 Other
- (make) Update makefile targets (dd4a473)
[0.2.0] - 2026-02-06
🚀 Features
- (linter) Add support for filtering by severity (7b46853)
- (completion) Add support for completing “std.get” (ae5a56b)
- (completion) Add extra description for std.contains (1a29616)
- (completion) Add config option to set the targeted jsonnet version for std completion (2c5dc24)
- (completion) Implement foldr and foldl (895d53c)
- (node) Add function to create a node from an integer (9f6bcd0)
- (completion) Add support for std.flattenArrays (b933516)
- (references) Add support for finding references of imports (5eea7f4)
- (diagnostics) Add diagnostic for finding unused libsonnet files (4819e0c)
- (diagnostics) Add diagnostics for numbers that are out of range (f2b2701)
- (binaries) Set the version name for the generated binaries (5d0a2db)
🐛 Bug Fixes
- Add inlay hints and signature help for std functions (79c8384)
- (diagnostics) Use correct code for object function diagnostic. Still broken due to another bug (050f938)
- (completion) Properly set the stdlib documentation kind to markdown (95c315c)
- (completion) Properly set the documentation for docsonnet nodes (7b28891)
- (completion) Allow get to be completed with all valid argument types (4097727)
- (completion) Fix foldl and foldr (2291e0c)
- (build) Remove not yet commited modules (8421e90)
- (references) Fix finding the actual file for import references (4b2090d)
- (completion) Properly handle resolve errors (20cb3f0)
- (completion) Make the CallStackIter fallible to fix wrong completion on invalid call chains (3f34c20)
- (stdfunc) Disable fold functions since they may lead to crashes (0672773)
🚜 Refactor
- (stdlib) Use lazylock and prevent clone for std lib completion (2d22d05)
- (stdlib) Use the lazy lock for finding the std fuction node (85fe65a)
- (completion) Move the std implementations into their own dir (ac49ff2)
- (completion) Use new function for make_array (cff64f6)
- (references) Split up reference logic (24dfcb8)
- (references) Support different reference types (a8b9ae5)
- (references) Rename refererence types to provider (4307f62)
- (node) Add UnaryOp as an enum (416c25e)
- (completion) Make the resolve iterator fallible (62e2d38)
- (deps) Replace bevy_tasks with rayon (3cea12e)
📚 Documentation
- Fix changelog in mdbook (ae40eed)
⚡ Performance
- (inlay) Filter out apply nodes that don’t have arguments (5bc2e86)
🧪 Testing
- (completion) Add test for completing get with a function parameter (11419e9)
- (references) Add tests for import references (1030be5)
- (docsonnet) Disable unreliable test (db7c9e2)
⚙️ Miscellaneous Tasks
- (github) Fix conform check for github (276d4fc)
- (logging) Remove debug logs (a7fde69)
- (nix) Add rustfmt (f4ae78c)
- (rust) Set rustfmt to edition 2024 (99e7f87)
- (github) Also build for aarch64 (59b54a8)
- (changelog) Add commit link to each entry (89b0650)
- (github) Fix conform if top commit is a merge commit (431bbad)
- (flake) Fix outputHash for go (0f28a40)
- (cliff) Remove merge commits from changelog (6449225)
📦 Dependencies
- (deps) Add renovate config (4878a14)
- (deps) Update rust crate anyhow to v1.0.101 (2b6258d)
- (deps) Update rust crate clap to v4.5.57 (12e7da5)
- (deps) Remove unused dependencies (33729d4)
- (deps) Update rust crate quote to v1.0.44 (871ee46)
- (deps) Update rust crate thiserror to v2.0.18 (1e3a473)
- (deps) Update rust crate schemars to v1.2.1 (48a5375)
- (deps) Update github.com/ihciah/rust2go digest to 1185786 (7813bca)
- (deps) Update dependency asciinema-player to v3.14.0 (0ca5631)
- (deps) Update rust crate mockall to 0.14.0 (5b7181e)
- (deps) Update rust crate htmd to 0.5.0 (eb22c2b)
- (deps) Update rust crate reqwest to 0.13.0 (2780a7e)
[0.1.0] - 2026-01-18
🚀 Features
- (debug) More trace logging (e44a1d7)
- (tokens) Add support for bridging treesitter tokens for editors without any basic features (31a184f)
- (bin) Run with godebug by default (999f9bc)
- (actions) Prepare for code actions (6f86907)
- (diagnostics) Cache the last diagnostic results (6884e93)
- (actions) Add support for code actions (dca7e62)
- (diag) Add support for variable naming diagnostics (827012b)
- (diag) Add linting for weird function definitions (6cac0d8)
- (diag) Add code action for renaming a local function (90f54f1)
- (diag) Add diag to prevent dollar usage (fa06695)
- (diag) Add ability to disable lints by adding a comment (f53831f)
- (diag) Update nolint query to only disable the lint for the next line (b515a47)
- (inlay) Replace : with = in parameters to have a valid jsonnet syntax (8678cbf)
- (diag) Add diagnostics for recursion in default function arguments (0715d44)
- (diag) Add a simple separate binary to lint code (31fe143)
- (linter) Add severity info to output (7bc1e86)
- (linter) Add note if there is an automatic fix available in the ls (79262f1)
- (diag) Add linter for shadowed variables (734b542)
- (diag) Add diagnostics for duplicate detection (4f98437)
- (diag) Add more config options for duplicate string detection (a155926)
- (diag) Add default uri and source name to the diagresults (992ece6)
- (diag) Increase default duplicate detection threshold to 5 (1f649c8)
- (lint) Force colors to be on (7f73ddf)
- (command) Add support for getting extvars, extcode, and jpaths via lsp commands (ce0bb15)
- (node) Add ability to get apply name with a var target (3d529df)
- (signature) Add basic signature help (6f77d54)
- (signature) Add argument positional information for signature help (6e06e43)
- (completion) Add docsonnet snippets (7350852)
- (output) Better display implementation for vars (0551e3a)
- (logging) Move performance logging to debug (e0bba01)
- (logging) Change default loglevel to info (095a2ee)
- (inlay) Don’t show the inlay hint if the variable name is identical to the parameter name (02805f8)
- (diagnostics) Replace busy wait with a condvar (c12e373)
- (nix) Add GODEBUG variable to flake (4aa98f6)
- (lint) Add parameters to code action message for function linter (9be17fe)
- (rust2go) Add a new crate for rust2go restart workaround (e080aa8)
- (build) Add support for cross compiling to windows (371103b)
- (linter) Add support for code climate output (f656141)
- (complete) Add newobject snippet for docsonnet (28d8bed)
- (diagnostics) Add diagnostics for wrong docsonnet defaults (f06abfb)
- (command) Properly format an eval error during a jsonnet.evalFile call (1e64f9d)
- (diag) [breaking] Add support for unused function parameters (cac98fe)
- (semantic) Add more tokens to treesitter bridge (ecc163a)
- (log) Add some additional logging (1fa7851)
- (diagnostics) Add a new linter for finding missing top level function default arguments (b2ecc2b)
- (diagnostics) Add linter for finding non hidden fields with a function as the body (3bf6160)
- (completion) Replace unimplemented std functions with the jsonnet version (e9d64c9)
- (docsonnet) Add default values for help and args of functions (b109adb)
- (lsp) Add flag to enable full sync option instead of incremental (a1d29bf)
- (ast) Try to add a ; to the end of the error line to fix the ast (09de2af)
- (completion) Add completion for unused function arguments (c5444b5)
- (config) Disable object function lint by default since there are still some problems (0be7ea4)
- (linter) Add support for specifying multiple files/directories (a34ac78)
🐛 Bug Fixes
- (completion) Fix completion inside nodes without a valid position (d03aae5)
- (log) Replace println with trace log (31641c5)
- (completion) Fix completion inside object locals (5392c1e)
- (completion) Fix completion inside an object’s assert (0dc780a)
- (completion) Fix completion with a broken binary (39936f4)
- Use correct token result to fix compilation (0addd8f)
- (test) Add missing test file (38a12be)
- (completion) Fix completion for the first node in an array after an assert (2c71f44)
- (diag) Fix locations of shadow diagnostics (f2024e9)
- (inlay) Fix inlay hints for apply with a var target (6abf04e)
- (snippets) Only show docsonnet snippets in an object (ff12a3b)
- (completion) Add missing std.is functions (32d90d0)
- (config) Prioritize explicitly set extcode over extcode from files (1831963)
- (lint) Also consider functions without a parameter for function lints (ba2b586)
- (definition) Fix definition location for nodes without a location (424e670)
- (completion) Fix global completion of object function parameters (5b1ffe1)
- (definition) Fix goto definition of arguments that are in an object field (892c24b)
- (definition) Fit goto definition in function args (49c6064)
- (references) Check the url as well for the self reference (e6af2b2)
- (definition) Add support for go to the definition of locals in objects (81e9c65)
- (diag) Fix unused diagnostics in object locals (3e1e93f)
- (definition) Fix going to definition inside a for with a trailing if (8db236d)
- (diag) Find unused arguments of object functions (3aa7062)
- (config) Use the default if someone still has the old unused_variables config (1dfa376)
- (uri) Fallback to from_str if the path cannot be found (d3a0766)
- (recording) Add workaround for errors in gitlab ci (964d6bf)
- (diagnostics) Properly set the filename of eval diagnostics (e5f24db)
- (callstack) Limit the number of max iterations (aa209d9)
- (resolve) Add some countermeasures for some possible infinite recursions (6f9c34f)
- (resolve) Correctly handle a function without an apply (874547d)
- (definition) Fix definition for locals in the current object if the field is a function (251f1d3)
- (windows) Allow windows to be compiled with its native compiler (0ab070a)
- (diagnostics) Fix eval diagnostics if the error is after the last line (959857c)
- (signature-help) Fix signature help for nested functions (7b61be2)
- (windows) Remove stupid windows path prefixes and hopefully fix windows (33f6bc4)
🚜 Refactor
- (location) Move jsonnet location code to their own crate (19ae600)
- (cst) Move cst code to a new crate (3b4f85d)
- Move filter logic to its own file (600e37c)
- (diag) Remove duplicate code for diagnostics (3578963)
- (lint) Remove macro to have better completion (2a19a40)
- (node) Move the nodes out of the lib and into their own crate (27b54a7)
- (config) Move configuration to its own crate (db27aa8)
- (bridge) Move evaluate error to bridge crate (97548f5)
- (config) Move FormatOptions to config (403ace7)
- (signature) Add common function to get apply and function node (a592678)
- Use a wrapper for apply function combo (4ba0093)
- (diag) Add custom struct for unused diagnostics instead of locals (0bba51d)
- (unwrap) Warn if unwraps are used and remove some of them (a304da7)
- (unwrap) Remove a few more unwraps (3dae254)
- (typo) Fix typo in struct name (9b4db14)
- (nodestack) Add iter() function for the NodeStack (7964f91)
- (uri) Use the url package to get the actual file path (34fd3e2)
- Remove two workspace related unwraps (f49469a)
📚 Documentation
- Add mdbook with some example recordings (19f4885)
- Add a few more example recordings (f445596)
- Compile all recordings at the same time (a887cd4)
- Add basic editor instructions (3b59e53)
- Add notifier to prevent possible endless loop (4b3dc9f)
- Add timeout for compiling recordings (d793184)
- Fix readme link (b808cbc)
- Automatically generate changelog for mdbook (963ebad)
- Add rename and references recording (dcafecf)
- Use external repo for lsp recordings (359d916)
- Add missing changelog page (b7388e7)
- Update doc Makefile with more targets (7e437d4)
- Mark code actions as done (d07c0f8)
- Remove changelog as it is a generated file (e93f85e)
- (mdbook) Fix changelog in mdbook (6bf23f2)
- (recordings) Fix builder recording (a64e032)
- (recordings) Add recording with live preview (2efe6a8)
- (readme) Add link to showcase page (ee0024b)
🧪 Testing
- (completion) Add test for completing inside std function parameters (a3de16e)
- Add missing changes for the loop test (1d222b2)
- Add failing test (d37f3f7)
- Add dollar import test (becff5b)
- Enable a deactivated test (eb76687)
- Fix diagnostic tests (aa016c5)
- (language-server) Add tests for multiple diagnostic files (cc727a7)
- (lint) Add test cases for snake case linter (9784f00)
- (lint) Add test cases for unused variables (9ab0eaa)
- Fix test compilation (abb526e)
- (diag) Add support for ignoring some fields (9b2f220)
- (diag) Add tests for shadow diagnostics (7a2de68)
- (diag) Add test for dollar diagnostics (3116eaf)
- (diag) Add tests for recursive arguments (d38483c)
- (inlay) Add tests for apply inlay hints (faf2d2b)
- Add simple docsonnet test (556a1fd)
- (function) Move some function tests to their correct file (216f5bc)
- (function) Add a few (failing) tests (a12cafc)
- (completion) Add test for std completions (979c2e6)
- (definition) Add failing test for function arguments (c6c68fc)
- (references) Ensure references stick to the correct file (075f1c2)
- Add failing tests for local in object (f2bc347)
- (completion) Add test for apply arguments when there are none left (ebf3ae9)
- (signature-help) Add some (failing) tests for signature help (db7fbf2)
- (inlay) Add test for long object hints (473fb1d)
⚙️ Miscellaneous Tasks
- (fmt) Format some code (6b297c7)
- Remove a bunch of unused files (13c6456)
- (git) Update gitignore (ef851b5)
- (docker) Add dockerfile to repo (284191e)
- Add git cliff config (98a0b83)
- Remove old file (6885a82)
- (recording) Add script for generating demo recordings (f325f89)
- Add conform config with pre commit hooks (d7d483f)
- Fix clippy warnings and add clippy to pre-push hooks (bda480e)
- Add some settings to (hopefully) prevent some AI slop (cd267ec)
- (license) Add license header to all files just to be on the safe side (ffe8c77)
- (cargo) Inherit workspace lints for all crates (c949731)
- (cargo) Add warnings for missing docs (f1698c5)
- (github) Add release workflow (9ce3ab8)
- (github) Add test workflow (e31261c)
- (github) Add workflow for generating the documentation page (421d471)
- Update AI slop protection (91cf3d6)
- (github) Fix executable name (495739a)
- (cargo) Disable docs warning again since there are so many (b53a2ce)
- (github) Add token for cliff (4d73814)
- (github) Fix github action (gitlab is way easier :/) (b12adee)
- (nix) Add follow for all nix inputs (f681bd0)
- (nix) Update flake lock (89060b0)
- (github) Compile releases for windows as well (697ab34)
- (github) Sett GODEBUG env variable (14d41b6)
- (github) Run windows tests (7e486ed)
- (github) Merge test cases and add test on darwin (8cc8215)
- (github) Add test report overview (4bdbee2)
- (github) Run conform on merge requests (3029cee)
- (github) Set version to the current tag version (2212956)
- (github) Publish docker image (6cf63c3)
- (github) Only build docker image on tags (1c67d8d)
📦 Dependencies
- (deps) Cleanup unused dependencies (cbeafc9)
- (deps) Update cargo dependencies (0ec0122)
- (deps) Update nix flake (c1175e2)
- (deps) Update tree-sitter to 0.25.10 (c1ff47e)
- (deps) Use treesitter >=0.22.6 for the language server crate (2583b4b)
💼 Other
- (diag) Create linter dir and remove unused imports (29f044d)
- Fix clippy warnings (39c51a9)
- Add first code for arguments documentation (1450dbd)
Setup
Editors
Neovim
To get autocompletion for the config, it is best to put the config in a json file next to the actual lsp configuration.
To do that, just put a grustonnet-ls.lua file in your after/lsp directory with the following content. The config will be loaded from a grustonnet.json file.
local function getJson(filename)
-- https://neovim.io/doc/user/lua.html#lua-script-location
local current_file = debug.getinfo(1, "S").source:sub(2)
local current_dir = vim.fn.fnamemodify(current_file, ":h")
local file_content = vim.fn.readfile(current_dir .. "/" .. filename)
return vim.json.decode(table.concat(file_content, "\n"))
end
local grustonnet_settings = getJson("grustonnet.json");
return {
cmd = { "grustonnet-ls" },
filetypes = { 'jsonnet', 'libsonnet' },
root_markers = { 'jsonnetfile.json', '.git' },
settings = grustonnet_settings,
}
To get a live preview and debugger support you can install my jsonnet-tools plugin
(Evil-)Helix
VSCodium
IntelliJ
Just don’t. IntelliJ is probably nice for Java development, but for other languages it just seems rather bad and does not have native support LSP, DAP, or Treesitter.
To get basic support you can use lsp4ij. However, you either need to separately install syntax highlighting or use the slow Treesitter bridge of the language server.
Dev Setup
To get a dev environment just install Nix and run nix develop .
To automatically enter the dev-shell install direnv and run direnv allow
Building containers
To ensure reproducibility there is no Dockerfile and all images are built using Nix.
Run nix build .#dockerImageFull do build the full image.
| Target | Description |
|---|---|
| dockerImageFull | Contains all binaries |
| dockerLs | Contains the language server |
| dockerLinter | Contains the linter |
| dockerDebugger | Contains the debugger |
To directly load the image into Podman you can use nix run .#dockerImageFull.copyToPodman