-
-
Notifications
You must be signed in to change notification settings - Fork 331
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
Way to disable HTML tags in hover block #3010
Comments
Judging from the docs, it means html tag will just be stripped out instead of rendering as plain text when
I just tested it by changing the value to
--- line 1<br>
--- line 2
---@class Test
--> hover shows `line 1 line 2`, instead of `line 1\nline2`
--> i.e. `<br>` is just stripped out
-- Adds `<amount>` of `<item>` to character.
---@param item string
---@param amount integer
function Character:AddItem(item, amount) end
--> now the hover can show the whole comment
I don't know how you tested it, except the --- line 1<br>
--- line 2
---@class Test1
--> works
--- line 1\n
--- line 2
---@class Test2
--> not work !!
--- line 1
--- line 2
---@class Test3
--> works
--- line 1\
--- line 2
---@class Test4
--> works |
Wow, nice research
Aww it is sad. I was hoping that the VS Code api wasn't so rough. It looks like the developers have to escape the lines themselves. I mean, maybe it's easier to do this on the LuaLS plugin side when displaying the hovers, like with some known "escapeHTML" methods.
Oh this should be done in several lines.... :o I was thinking in one because I'm confused by site description:
I completely forgot that new |
Yeah, that might be a solution. 👍 In addition since |
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.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
Additional Notes
I found some info on this page https://luals.github.io/wiki/annotations/
but only the first one seems to work, and the others don't do anything.
Log File
No response
The text was updated successfully, but these errors were encountered: