Allow bundling parentheses into clusters to provide more flexibility and deal with more complex occasions #176
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(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...