Skip to content

Conversation

@senioria
Copy link
Contributor

@senioria senioria commented Dec 5, 2021

(This pr is the successor of #175)
(Currently this is only a draft since its documents are not yet updated)

As introduced in #174 and #161, some languages may have different syntax for parentheses inside and outside some environments; though they can be solved without adding any features, there are some issues beyond the issue themselves. Typically, a solution is adding a new vim syntax matching the special region, and define the parentheses to be containedin them. The shortcoming of the solution is that the environment itself (usually would be considered as parentheses) can't be rainbowed, and the parentheses inside the environment would have its rainbow level reset to 0.

This patch offers a way to solve these within rainbow. By bundling the toplevel parentheses, the region markers, and the parentheses within the regions into different clusters and assigning correct containing relation for them, they can cascade and all be rainbowed in correct levels.

However, after all, the patch may add too much complexity to rainbow... If this feature is considered worthwhile to be introduced into rainbow, Senioria will update the documents...

@senioria senioria marked this pull request as draft December 5, 2021 06:49
@CoelacanthusHex
Copy link

Considering rainbow.vim not too heavy, and this plugin is used to indicate syntax units.
So I think accuracy is more important than speed.

@senioria
Copy link
Contributor Author

senioria commented Dec 5, 2021 via email

…em in the parentheses config

and fix the warning when contains_prefix is empty
trimmed some trailing spaces
documented some commands
@senioria senioria marked this pull request as ready for review December 27, 2021 02:20
@senioria
Copy link
Contributor Author

However, the issues this pr intended to fix is not actually fixed yet, because it remains uncertain how shell codes and html templates should be highlighted...

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.

2 participants