LuaLS / LuaLS/lua-language-server
Way to disable HTML tags in hover block
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?
Windows
What is the issue affecting?
Hover
Expected Behaviour
Hi. I've come across the fact that some people want to use angle brackets as a classic description for arguments, like command-line arguments <arg>[, arg]. But VS Code automatically considers these HTML tags in hover block and deletes them. I would like to be able to disable this behavior in per-project (workspace or .luarc) and user settings.
-- Adds <amount> of <item> to character.
---@param item string
---@param amount integer
function Character:AddItem(item, amount) end
Also I like to use markdown style, but not html tags.
I found #996 where it feels like html tags can be disabled without disabling markdown - supportHtml.
Actual Behaviour
It ate my names, they're not html tags.
Reproduction steps
- Place anything in angle brackets in your comment
- Look, it's gone when you hover
Additional Notes
I found some info on this page https://luals.github.io/wiki/annotations/
The below methods can be added to the end of a line:
HTML <br> tag (recommended)
\n newline escape character
Two trailing spaces (may be removed by formatting tools)
Markdown backslash \ ( [not recommended](https://www.markdownguide.org/basic-syntax#line-break-best-practices) )
but only the first one seems to work, and the others don't do anything.
Log File
No response
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
Start by tracing the hover rendering and configuration paths for the Lua language server, using the referenced #996 supportHtml behavior as a comparison. Check how workspace, .luarc, and user settings are read, then reproduce the angle-bracket example in the VS Code extension. Done means markdown remains enabled while HTML-tag interpretation can be disabled per project or user settings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, vscode
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100