LuaLS / LuaLS/lua-language-server

feature request: markdown field support in aliases

Open
#2,259 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Lua
Stars
4.4k
Forks
442
PR merge metrics
No merged PRs in 30d

Description

Currently, when writing an alias such as:
```lua
---@alias fontmeta.alias.NameTableFormat
---| 0 # Always 0 for TrueType, OpenType accept it as well. See [OpenType Name Table Version 0](https://learn.microsoft.com/en-us/typography/opentype/spec/name#naming-table-version-0).
---| 1 # Can only be 1 for OpenType. See [OpenType Name Table Version 1](https://learn.microsoft.com/en-us/typography/opentype/spec/name#naming-table-version-1).
---| integer
```

The markdown of the description text (after the `#`) are not parsed as markdown:
![image](https://github.com/LuaLS/lua-language-server/assets/38175840/92be85a0-81d0-47c3-a260-66754d05b4d3)

Would be neat if the alias was parsed as multiple tags, similar to how it is done with arguments:
(the `data` argument)
![image](https://github.com/LuaLS/lua-language-server/assets/38175840/e6d5fab2-c1a1-41a6-aca0-638d51774a3c)

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 does not name files or tests. Start by tracing alias parsing and compare it with the existing argument/data markdown handling described in the report; done means markdown in alias descriptions is rendered consistently with argument descriptions.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
devtools
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.