grafana / grafana/jsonnet-language-server

IntelliSense/Autocomplete not working for merged Jsonnet objects

Open
#242 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
223
Forks
33
PR merge metrics
No merged PRs in 30d

Description

The Jsonnet Language Server provides IntelliSense for direct imports but not for objects created by merging imported objects.This is a common pattern in Jsonnet codebases where libraries are imported and then merged with configuration. The LSP should be able to infer that merged objects retain the same structure as the base object.

**Steps to Reproduce:**
1. Import a Jsonnet library: `local kubeBase = (import 'kube.libsonnet');`
2. Merge it with configuration: `local kube = kubeBase { namespace:: 'test', ... };`
3. Try to use IntelliSense: Type `kube.` - no autocomplete appears
4. Compare with: Type `kubeBase.` - autocomplete works correctly

**Environment:**
- Extension: Grafana Jsonnet v0.7.2
- Jsonnet Language Server version: 0.16.0
- Editor: Cursor 2.3.29
- OS: Debian GNU/Linux 12 (bookworm) on Linux 6.8.0-1030-azure (Azure Codespaces)
- Architecture: x86_64

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the merge example from the issue in the Jsonnet language server and compare autocomplete for kubeBase and kube. Trace the IntelliSense path for imported objects and merged objects; done means kube. offers the inherited structure while direct-import completion remains working.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.