ProofWidgets GraphDisplay Not working
- Dominant language
- Lua
- Stars
- 581
- Forks
- 60
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 2
Description
* Current lean.nvim version: branch main / commit b2a473c
* Current nvim version: v0.12.2
* Terminal: Ghostty / commit : https://github.com/ghostty-org/ghostty/commits/332b2aefc
Tested on iterm2 as well. I am not able to view any widget. Sample code tested on:
```lean
module
public meta import ProofWidgets.Component.GraphDisplay
public meta import ProofWidgets.Component.HtmlDisplay
public meta import ProofWidgets.Component.InteractiveSvg
public meta section
/-! ## Directed graphs with `GraphDisplay` -/
open ProofWidgets Jsx
/-! ### Basic usage -/
def mkEdge (st : String × String) : GraphDisplay.Edge := {source := st.1, target := st.2}
-- Place your cursor here.
#html
```
Output:
```json
{
defaultEdgeAttrs = { { "fill", "var(--vscode-editor-foreground)" }, { "stroke", "var(--vscode-editor-foreground)" }, { "strokeWidth", 2 }, { "markerEnd", "url(#arrow)" } },
edges = { {
attrs = {},
source = "b",
target = "c"
}, {
attrs = {},
source = "d",
target = "e"
}, {
attrs = {},
source = "e",
target = "f"
}, {
attrs = {},
source = "f",
target = "d"
} },
forces = { {
link = vim.empty_dict()
}, {
manyBody = vim.empty_dict()
}, {
x = vim.empty_dict()
}, {
y = vim.empty_dict()
} },
showDetails = false,
vertices = { {
boundingShape = {
circle = {
radius = 5
}
},
id = "a",
label = {
element = { "circle", { { "r", 5 }, { "fill", "var(--vscode-editor-background)" }, { "stroke", "var(--vscode-editor-foreground)" }, { "strokeWidth", 1.5 } }, {} }
}
}, {
boundingShape = {
circle = {
radius = 5
}
},
id = "b",
label = {
element = { "circle", { { "r", 5 }, { "fill", "var(--vscode-editor-background)" }, { "stroke", "var(--vscode-editor-foreground)" }, { "strokeWidth", 1.5 } }, {} }
}
}, {
boundingShape = {
circle = {
radius = 5
}
},
id = "c",
label = {
element = { "circle", { { "r", 5 }, { "fill", "var(--vscode-editor-background)" }, { "stroke", "var(--vscode-editor-foreground)" }, { "strokeWidth", 1.5 } }, {} }
}
}, {
boundingShape = {
circle = {
radius = 5
}
},
id = "d",
label = {
element = { "circle", { { "r", 5 }, { "fill", "var(--vscode-editor-background)" }, { "stroke", "var(--vscode-editor-foreground)" }, { "strokeWidth", 1.5 } }, {} }
}
}, {
boundingShape = {
circle = {
radius = 5
}
},
id = "e",
label = {
element = { "circle", { { "r", 5 }, { "fill", "var(--vscode-editor-background)" }, { "stroke", "var(--vscode-editor-foreground)" }, { "strokeWidth", 1.5 } }, {} }
}
}, {
boundingShape = {
circle = {
radius = 5
}
},
id = "f",
label = {
element = { "circle", { { "r", 5 }, { "fill", "var(--vscode-editor-background)" }, { "stroke", "var(--vscode-editor-foreground)" }, { "strokeWidth", 1.5 } }, {} }
}
} }
}
```
I tried toggling on the enable widget and checkhealth didn't indicate anything. Also installed resvg but also nothing. Above snippet works on `vscode`
Contributor guide
Research direction
Reproduce the supplied Lean snippet using ProofWidgets.Component.GraphDisplay in lean.nvim, with widgets enabled, and compare the result with VS Code. Start by tracing how lean.nvim handles the GraphDisplay widget output; done means the graph is visible in Neovim and the behavior is verified without relying on resvg.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, neovim
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100