Code Monkey home page Code Monkey logo

Comments (5)

whonore avatar whonore commented on August 19, 2024

Thanks for reporting this. There are two issues that prevent your syntax rules from working.

First, you have to add coqprime to the coqTerm syntax group since most of the top-level syntax rules use contains=@coqTerm.

syn cluster coqTerm add=coqprime

Second, forall and fun are defined as keywords in Coqtail's syntax/coq.vim, which have higher priority than matches (:h syn-keyword). As far as I know, the only way to have your rules take precedence is to also define them as keywords.

syn keyword coqprime forall conceal cchar=
syn keyword coqprime exists conceal cchar=
syn keyword coqprime fun conceal cchar=λ

from coqtail.

mizlan avatar mizlan commented on August 19, 2024

Thanks for your help. I had a suspicion about the latter "keyword" priority vs. match part, but I had no idea about syntax groups/clusters. Thanks for showing me, and thanks for teaching me about syntax groups!

from coqtail.

mizlan avatar mizlan commented on August 19, 2024

Oh: there is a funny issue now where the concealed symbols have Normal bg when they instead should have CoqtailChecked:

Screen Shot 2023-11-06 at 2 54 30 PM

I have yet to look into this but might you know how to resolve this?

from coqtail.

whonore avatar whonore commented on August 19, 2024

I'm not sure how or if there's a way to fix that. The CoqtailChecked highlighting is added with matchadd, which the Vim docs say should always have priority over syntax highlighting (:hi), but it seems like conceal may work differently. I found these links confirming other people have this issue, but no solutions as far as I can tell.

https://stackoverflow.com/questions/24131474/can-i-fix-conceal-highlight-group-background-in-highlighted-lines
https://vi.stackexchange.com/questions/26742/how-to-overwrite-the-conceal-background-color-with-line-color

from coqtail.

mizlan avatar mizlan commented on August 19, 2024

I see, thanks! I think I will stick with not concealing; I don't even know how I got so committed to this rabbithole in the first place. Thanks for your help.

from coqtail.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.