Skip to content

Item Option highlight group and concealing #2885

@Kayzels

Description

@Kayzels

Is your feature request related to a problem? Please describe it.
Not a problem as such, just something I've noticed. I use the description environment a lot when writing LaTeX. That uses the \item[value] syntax. That is, it provides an optional argument to the \item command. At the moment, with \item concealed, it looks a bit strange.

For example:
\item[Corrective Maintenance] In response to system errors.
looks like
○[Corrective Maintenance] In response to system errors.

It's not really a problem, but it feels squished. And because the word in [] is typically important, I'd love to be able to change how it looks.

Describe the solution you'd like
Preferably, I'd like to be able to change the way that the argument in […] looks. For example, make it bold, or change its color. That would be possible through a highlight group that targets it. Even better, although I imagine its trickier, I'd like to be able to see the text in the […] but conceal the […] to just show the text. That was possible for arguments in custom commands.

Describe alternatives you've considered
I tried defining item as a custom command in g:vimtex_syntax_custom_commands. I set it to have no argument, and opt to true. I was able to change the concealchar, but the highlight groups I expected to be defined didn't exist. From my understanding, if this worked, then texCmdCItem and texCItemOpt should exist.

Is what I'm looking for possible?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions