Allow bundling parentheses into clusters to provide more flexibility and deal with more complex occasions#176
Open
senioria wants to merge 3 commits intoluochen1990:masterfrom
Open
Allow bundling parentheses into clusters to provide more flexibility and deal with more complex occasions#176senioria wants to merge 3 commits intoluochen1990:masterfrom
senioria wants to merge 3 commits intoluochen1990:masterfrom
Conversation
and wrapped the long line
|
Considering rainbow.vim not too heavy, and this plugin is used to indicate syntax units. |
Contributor
Author
|
But every huge project is piled up with such not-too-heavy pieces... Senioria think this unnecessary because there may
be nobody relying on the rainbow color level to distinguish the nesting level and this is not a good practice;
furthermore, it seems that few people had ever desired handle all parentheses in rainbow or have such accuracy... And
once the feature is added, whether it's used or not, the cost it introduces exist and it should be kept for the sake of
compatibility...
After all, efficiency is not the most important point: there are too many plugins consuming much more time, and the
limited complexity of languages ensured rainbow just need to process a rather small set of rules at startup.
…On Sun, Dec 05, 2021 at 12:06:57AM -0800, Coelacanthus wrote:
Considering rainbow.vim not too heavy, and this plugin is used to indicate syntax units.
So I think **accuracy is more important than speed.**
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#176 (comment)
|
…em in the parentheses config and fix the warning when contains_prefix is empty
trimmed some trailing spaces documented some commands
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... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
containedinthem. 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...