Skip to content

Highlight postulates and assumptions distinctly, by severity - #77

Merged
fizruk merged 2 commits into
mainfrom
postulate-highlight
Jul 21, 2026
Merged

Highlight postulates and assumptions distinctly, by severity#77
fizruk merged 2 commits into
mainfrom
postulate-highlight

Conversation

@fizruk

@fizruk fizruk commented Jul 19, 2026

Copy link
Copy Markdown
Member

The language server marks #postulate and #assume names with standard semantic token modifiers, at the declaration and at every use site. Map them to TextMate scopes for the rzk languages, in decreasing order of severity:

  • function.abstract.static (#postulate, a permanent axiom) -> invalid: error red in essentially every theme;
  • function.abstract (top-level #assume, a file-wide axiom) -> string.regexp: the same reddish colour as holes;
  • parameter.abstract (#assume inside a #section, a hypothesis discharged at its #end) -> markup.italic: italics.

A token style comes from a single winning theme rule, so each tier maps to one scope; scope stacks do not compose a colour from one rule with a font style from another. Clients without this mapping keep rendering plain function and parameter names.

fizruk added 2 commits July 19, 2026 10:29
The language server marks #postulate and #assume names with standard
semantic token modifiers, at the declaration and at every use site.
Map them to TextMate scopes for the rzk languages, in decreasing
order of severity:

- function.abstract.static (#postulate, a permanent axiom) ->
  invalid: error red in essentially every theme;
- function.abstract (top-level #assume, a file-wide axiom) ->
  string.regexp: the same reddish colour as holes;
- parameter.abstract (#assume inside a #section, a hypothesis
  discharged at its #end) -> markup.italic: italics.

A token style comes from a single winning theme rule, so each tier
maps to one scope; scope stacks do not compose a colour from one
rule with a font style from another. Clients without this mapping
keep rendering plain function and parameter names.
@fizruk
fizruk merged commit f16dc8d into main Jul 21, 2026
1 check passed
@fizruk
fizruk deleted the postulate-highlight branch July 21, 2026 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant