redhat-developer / redhat-developer/yaml-language-server

Get definition on sequence item

Open
#979 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.