codemap.vscode
codemap.vscode copied to clipboard
Improving Generic Map by Reworking levelIndent
Enhancement Proposal
Codemap levelIndent property can cause improper or infinite nesting due to a only indent level handling. Introducing hierarchy level handling addition to indent level handling can resolve the issue.
Solution Description
Implementing hierarchy level by promoting levelIndent to identify not a whitespace indent on files, but a hierarchy level among other mapping rules of a indent dependant programming language file.
Non-hiearachy Mapping Rules
- If a mapping rule has no hiearchy, it cannot nest other mapping rules.
Hierarchy Priority
- Mapping rules with levelIndent property set other than zero (0) can nest lower level hierarchies (lower number, higher hierarchy).
Resolving Hierarchy with same Indentation
- When mapping rules with levelIndent has same indentation, higher hierarchy mapping rule will nest lower level hierarchy.
Further Improvements to Proposal
-
[ ] Implementing mapping rule category: When different categories mapping rules with the same indentation but different hierarchy levels can nest each other.
-
[ ] Supporting non-indent based programming languages by improving hierarchy algorithm.
Hi @omemisoglu, I noticed you have created the PR, so let's keep the conversation there.