Skip to content

Enhance @alias to allow numeric enums with comments #1230

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

Closed
Rouneq opened this issue Jun 23, 2022 · 2 comments
Closed

Enhance @alias to allow numeric enums with comments #1230

Rouneq opened this issue Jun 23, 2022 · 2 comments
Labels
enhancement New feature or request feat/LuaCats Annotations Related to Lua Language Server Annotations (LuaCats)
Milestone

Comments

@Rouneq
Copy link

Rouneq commented Jun 23, 2022

Given an alias

---@alias lootType integer
---| 1 # Leader
---| 2 # Leader & GroupLeader
---| 3 # Leader & Specified

it currently reports only the values. I'm currently working around this by using integer in the definition. The term 'integer' "pollutes" the documentation. The comments aren't displayed at all.

lootType

Without the use of integer, the annotation gives a warning.

aliasWarning

In conjunction with an issue I just opened (#1229), an enhancement to accept numeric values and include comments with the annotations presented can address this.

@sumneko
Copy link
Collaborator

sumneko commented Jun 23, 2022

This is not this language server on your screenshot.

@Rouneq
Copy link
Author

Rouneq commented Jun 23, 2022

That's odd. I don't have any other language server loaded.

Edit: I didn't think I had another loaded. Removed the other and it's much cleaner.

lootType2

The original request still applies. Comments are not provided in the example.

@sumneko sumneko added feat/LuaCats Annotations Related to Lua Language Server Annotations (LuaCats) enhancement New feature or request labels Jun 24, 2022
@sumneko sumneko added this to the 3.5.0 milestone Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feat/LuaCats Annotations Related to Lua Language Server Annotations (LuaCats)
Projects
None yet
Development

No branches or pull requests

2 participants