Zulip Chat Archive

Stream: lean4

Topic: highlighting of custom notation


MangoIV (Aug 26 2023 at 22:08):

Hi, I have notation like
scoped notation:50 a " has " b:51 " in " c => ... and I see that in gets highlighted, probably because of the List in, but has doesn't. Do I have to implement highlighting for every word? If so how? If not, how does this work?

Kyle Miller (Aug 26 2023 at 22:24):

Assuming you're using VS Code: There are some keywords built into the VS Code extension, which probably explains "in". Make sure you have "semantic highlighting" enabled: https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/Manual.20syntax.20highlighting.20in.20VS.20Code/near/373188215

MangoIV (Aug 26 2023 at 22:39):

I’m using neovim, so I will have a look whether something equivalent exists there

Kyle Miller (Aug 26 2023 at 22:46):

It looks like @Julian Berman has some tips: https://github.com/Julian/lean.nvim/wiki/Configuring-&-Extending#semantic-highlighting

MangoIV (Aug 26 2023 at 23:08):

This looks useful, will try it out tomorrow

MangoIV (Aug 26 2023 at 23:54):

Seems like it changes nothing for me :3 Perhaps it was already on

Julian Berman (Aug 27 2023 at 05:00):

I see
Screenshot-2023-08-27-at-07.58.41.png

(with semantic highlighing enabled). Do you see something different?

MangoIV (Aug 27 2023 at 08:09):

Yes, the has is highlighted differently than the in. Can you perhaps link me to your neovim config, please?

Julian Berman (Aug 27 2023 at 18:16):

Everything is here: https://github.com/Julian/dotfiles/

Julian Berman (Aug 27 2023 at 18:16):

(I can try to point you more specifically tomorrow if need be)

MangoIV (Aug 27 2023 at 18:33):

Thank you I will try it out and will come back if I’m too stupid again :3


Last updated: Dec 20 2023 at 11:08 UTC