Skip to content

Allow symbol/string literal types #35

@lekemula

Description

@lekemula

Hi,

Coming from the solargraph-rspec Ruby LSP plugin side here, sometimes it is useful to declare enum-like possible literals: @param [:some_symbol, :some_other_symbol].

While this is not part of the YARD https://www.rubydoc.info/gems/yard/file/docs/Tags.md#literals specification, as the YARD author mentions, that list is non-exhaustive, leaving room for such cases.

Would it make sense to extend YARD/TagTypeSyntax to allow :symbol and 'string' literals, or at least add a configuration flag to permit them?

If you find this acceptable, I can also look into extending/adding it myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions