LuaLS / LuaLS/lua-language-server
Irritating Markdown syntax for headings conflicts with traditional comment frames in Lua
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 4.4k
- Forks
- 442
- PR merge metrics
- No merged PRs in 30d
Description
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Linux
What is the issue affecting?
Annotations
Expected Behaviour
"Hello World!" in the following annotation is NOT treated as a heading:
--------------------------------------------------------------------------------
--- Hello World!
--------------------------------------------------------------------------------
local function Main() end
Actual Behaviour
"Hello World!" shows as a heading in the documentation pop-up window like so.
Reproduction steps
Type the following code and hover your mouse over the function name.
--------------------------------------------------------------------------------
--- Hello World!
--------------------------------------------------------------------------------
local function Main() end
Additional Notes
As someone who likes to frame documentation comments, I find this issue unbearable. The reason we should except Markdown's dash ---- syntax for headings in LuaCATS is because Lua uses dashes to delimit the comments themselves. And those who frame comments also use the same character (dash) for the rest of the frame. You wouldn't use another character for the frame, it would look ugly and not uniform. For example, in C, Markdown's heading syntax does not conflict with the comment delimiter (//). So you can frame your comments by repeating the comment delimiter itself for a uniform frame.
Log File
Log files have no use in this issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in the Visual Studio Code extension by hovering over the function in the framed Lua annotation shown in the report. Start by locating the LuaCATS Markdown heading handling used for annotation documentation, then verify that the framed “Hello World!” text is no longer rendered as a heading while ordinary Markdown headings still work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100