Zulip Chat Archive

Stream: general

Topic: VS Code hover issue


Kevin Buzzard (Jan 12 2019 at 19:47):

example (A C D : Type) (zzz : A  C) (g : C  C  D) (a : A) : D :=
begin
  apply g (zzz a) (zzz a),
end

If I try this in VS Code (on Ubuntu) and hover over the two zzzs in the apply tactic line, the first one doesn't give me a little transient window saying zzz : A \to C but the second one does. Can someone else reproduce? Should I expect the window to pop up for the first zzz as well?

Reid Barton (Jan 12 2019 at 19:51):

I get the corresponding behavior in emacs too, so I guess it is an issue with Lean itself

Kenny Lau (Jan 12 2019 at 19:51):

reproduced (Windows, VS Code)

Kevin Buzzard (Jan 12 2019 at 19:51):

by exact g (zzz a) (zzz a) has the issue, but just giving the term mode proof makes things work again.

Kenny Lau (Jan 12 2019 at 19:52):

reproduced all three behaviours

Chris Hughes (Jan 12 2019 at 20:03):

This is actually quite annoying whenever I do a by haveI := _; exact _ proof

Kevin Buzzard (Jan 12 2019 at 20:04):

So it's the Lean server which ships these little windows out?

Kenny Lau (Jan 12 2019 at 20:05):

can we have the complicated diagram again?

Kevin Buzzard (Nov 10 2020 at 16:42):

Line 240 of ring_theory.integral_closure is

  have := fg_mul _ _ (fg_adjoin_singleton_of_integral x hx) (fg_adjoin_singleton_of_integral y hy),

and I'm surprised to note that in VS Code if I hover over the first fg_adjoin_singleton_of_integral then nothing happens, but if I hover over the second one I see the type as expected. Is this a bug?

Bryan Gin-ge Chen (Nov 10 2020 at 17:10):

This looks more like a problem with Lean rather than with VS Code or the extension. It might be good to collect examples like this in an issue here: https://github.com/leanprover-community/lean/issues

Kevin Buzzard (Nov 10 2020 at 17:42):

I'll try to minimise before I open an issue.

Kenny Lau (Nov 13 2020 at 18:05):

@Kevin Buzzard is it intentional that you extended an older thread?

Kevin Buzzard (Nov 13 2020 at 18:06):

No, it was a coincidence that the older thread had the same name.

Kenny Lau (Nov 13 2020 at 18:08):

I guess you haven't changed in 1 year and 10 months

Kevin Buzzard (Nov 13 2020 at 18:10):

In fact I hadn't even noticed that I was extending an older thread of my own until you just pointed it out.

Sorawee Porncharoenwase (Nov 15 2020 at 00:29):

I have a distantly related issue. VS Code seems to highlight incorrectly in the following case:

Screen-Shot-2020-11-14-at-16.26.38.png

Screen-Shot-2020-11-14-at-16.26.48.png

Is this a Lean issue or VS Code?

Bryan Gin-ge Chen (Nov 15 2020 at 01:31):

This is probably an issue with the widget. Where did you put your mouse cursor in the two cases?

cc: @Edward Ayers

Sorawee Porncharoenwase (Nov 15 2020 at 09:13):

\forall and \wedge.

Edward Ayers (Nov 15 2020 at 19:23):

Yeah this is caused by the linebreaking

Edward Ayers (Nov 15 2020 at 19:24):

I think that the second screenshot is correct behaviour

Edward Ayers (Nov 15 2020 at 19:27):

the first screenshot is an issue caused by the way the CSS linebreaking currently works. It's a tricky one to fix because it's caused by some wacky CSS behaviour. :'(


Last updated: Dec 20 2023 at 11:08 UTC