redhat-developer / redhat-developer/yaml-language-server
Get definition on sequence item
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 352
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 11
Description
When using a yaml sequence, there seems to be no way to hover the definition of a sequence item:
some_sequence:
- mysequence_item_key: value # There is no position I can hover from that will give definition of the whole node in sequence
second_key: value2
other_sequence:
- { # If I hover on the brace, I do get the definition of the node in the sequence.
mysequence_item_key: value,
second_key: value
}
Describe the solution you would like
Support hovering definition of the sequence item on the - char
some_sequence:
>>-<< mysequence_item_key: value # Hover on the - to get definition of sequence item
second_key: value2
Currently this provides no information, and it seems like the most logical place to hover.
Describe alternatives you have considered
Write all sequences items with explicit curly braces, but now all key/value pairs must be delineated with commas, and all sequences and mappings in the sequence item also require explicit braces and brackets.
sequence:
- {
key: [sequence, must, have, square, bracket],
between_keys: {must: [have, commas, and, braces]}
}
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
The issue names no source files, tests, or entry points. Locate the language server's hover and definition handling for block sequence nodes, then add coverage for hovering the '-' marker; done means the sequence item's definition is shown there without requiring flow-style braces.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, yaml
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100