Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support identifier enum variant #70

Merged
merged 1 commit into from
Dec 15, 2022
Merged

feat: support identifier enum variant #70

merged 1 commit into from
Dec 15, 2022

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
1 participant