-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inlay hint display for juxtaposition and infix operators #532
Comments
The inlay hints are supposed to just replicate what Cthulhu prints in the REPL. Do they print differently in the REPL? Otherwise this is a more general problem. |
Looks different: julia> f(x) = 2x
f (generic function with 1 method)
julia> @descend f(3.0)
f(x) @ Main REPL[2]:1
1 f(x::Float64)::Float64 = 2x::Float64
julia> f(x) = 2*x
f (generic function with 1 method)
julia> @descend f(3.0)
f(x) @ Main REPL[4]:1
1 f(x::Float64)::Float64 = 2*x::Float64
(tmp.6EvBOOSOSW) pkg> st
Status `/tmp/tmp.6EvBOOSOSW/Project.toml`
[f68482b8] Cthulhu v2.10.0 |
I'm struggling to reproduce this, could you make sure you're on the latest version (1.2.4) of TypedSyntax. Also what are your Cthulhu settings, i.e. mine have warnings off, don't hide type-stable statements, etc. julia> @descend f(3.0)
f(x) @ Main /media/rag/NVME/Code/Cthulhu.jl/tmp.jl:1
1 f(x::Float64)::Float64 = 2x::Float64
Select a call to descend into or ↩ to ascend. [q]uit. [b]ookmark.
Toggles: [w]arn, [h]ide type-stable statements, [t]ype annotations, [s]yntax highlight for Source/LLVM/Native, [j]ump to source always, [v]scode: inlay types, [V]scode: diagnostics.
Show: [S]ource code, [A]ST, [T]yped code, [L]LVM IR, [N]ative code
Actions: [E]dit source code, [R]evise and redisplay
• 2x::Float64
↩ I'm on a slightly newer version of VSCode, 1.85.1, but I fail to see why that would make a difference. |
The inlay hints look a bit odd for juxtaposition and infix operators. I don't know if there's a standard way to display these in other languages that have inlay hints, so I don't have a solution, just pointing out the issue for discussion.
For juxtaposition, it just juxtaposes the hints:
and for infix operations it puts the hint on the operator:
The text was updated successfully, but these errors were encountered: