redhat-developer / redhat-developer/vscode-yaml
Fold all by label
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 829
- Forks
- 260
- Avg merge
- 5h 43m
- Merged PRs (30d)
- 1
Description
Is your enhancement related to a problem? Please describe.
As someone who works with Ansible and makes frequent use of inline Vault-encoded secrets, I often have large chunks of text in my code that are gibberish and I dont need to directly edit. IE:
-name : "my_web_cert"
data: !vault |
$ANSIBLEVAULT;1.1:AES256
29387345782436495734589632895763298756238576234987652384756239854623987568395642
[repeat for many lines]
45i35928375483975
Describe the solution you would like
As VSCode (and the YAML extension) support code-folding based on indentation/nodes, it would be quite helpful to be able to fold all nodes matching a specific text-string (maybe all nodes that match the currently highlighted text) so I could, for example, fold all the data: !vault | content with one quick action.
Describe alternatives you have considered
Would it be better to add this functionality to VSCode's core and make it a general feature across all code? Possibly. I'm not sure what the impacts of using it on non-'structured' would have. This is just my specific use case. I will add a similar request to the core VSCode project for discussion.
Additional context
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing how the YAML extension currently provides indentation- and node-based folding, then compare that with VS Code's core folding behavior. Clarify whether matching highlighted text or a specified label should drive folding, and whether the feature belongs in the extension or VS Code core. Done means the ownership and matching behavior are agreed and the requested nodes can be folded through one action.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode, yaml
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100