Skip to content

Conversation

@numToStr
Copy link
Owner

This PR adds support for enum variant which includes identifier as its member.

  • Literal variant

Member will always be treated as string value. This matches the LLS behavior.

---| '<literal>' [# description]
  • Identifier variant
---| `<identifier>` [# description]

Emmylua

---Vim operator-mode motions.
---
---Read `:h map-operator`
---@alias VMode
---| '"line"' # Vertical motion
---| '"char"' # Horizontal motion
---| 'v'
---| `some.ident` # Some identifier

Help

VMode                                                                    *VMode*
    Vim operator-mode motions.

    Read `:h map-operator`

    Variants: ~
        ("line")      Vertical motion
        ("char")      Horizontal motion
        ("v")
        (some.ident)  Some identifier

Screenshot

  • Inline enum

  • ---@alias enum

@numToStr numToStr linked an issue Dec 15, 2022 that may be closed by this pull request
@numToStr numToStr merged commit 4353a66 into master Dec 15, 2022
@numToStr numToStr deleted the enum-ident branch December 15, 2022 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Literal values in the type definition lead to empty docs

2 participants