Skip to content
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

[FR] Improve display of tooltips #455

Closed
serg3295 opened this issue Mar 19, 2021 · 6 comments
Closed

[FR] Improve display of tooltips #455

serg3295 opened this issue Mar 19, 2021 · 6 comments
Labels
enhancement New feature or request priority.high A high priority topic

Comments

@serg3295
Copy link
Contributor

serg3295 commented Mar 19, 2021

To improve the display of the function description on hover, can you provide support for the <br> tag in the ---@param line to enter a line breaks without adding spaces between lines?

luaSrvEnh3

@sumneko sumneko added the enhancement New feature or request label Mar 19, 2021
@sumneko
Copy link
Collaborator

sumneko commented Mar 31, 2021

Maybe supports this:
---@param name type "line1\nline2"

@serg3295
Copy link
Contributor Author

Looks good to me.
Is it will apply to ---comments and to ---@return as well,
or only to ---@param ?

@sumneko sumneko added the priority.high A high priority topic label Apr 30, 2021
@serg3295
Copy link
Contributor Author

serg3295 commented Apr 30, 2021

Additional line breaks suggestions

In the --Description section I use backslash \ for line breaks.
In the section --Return backslash also breaks the line. But not on the line ---@return
Is it possible to line breaks with the \ character (or in any other way) in the ---@return line?

--- This is description\
--- with line breaks
---@param par1 table @fist line of params
--- - list -> line1
--- - list -> line2
--- - list -> line3\
---text parameters
---@return table tbl @returns table:\
--- - field 1
--- - field 2\
---text
function linebreaks(par1) end                                                               

@sumneko
Copy link
Collaborator

sumneko commented May 7, 2021

Additional line breaks suggestions

In the --Description section I use backslash \ for line breaks.
In the section --Return backslash also breaks the line. But not on the line ---@return
Is it possible to line breaks with the \ character (or in any other way) in the ---@return line?

--- This is description\
--- with line breaks
---@param par1 table @fist line of params
--- - list -> line1
--- - list -> line2
--- - list -> line3\
---text parameters
---@return table tbl @returns table:\
--- - field 1
--- - field 2\
---text
function linebreaks(par1) end                                                               

The current rules of comments showing are already very complicated, and I don't want to further increase his complexity. Longer descriptions are best written in the description area, and the tail description of the annotation area is only used to write some shorter hints.

@sumneko
Copy link
Collaborator

sumneko commented May 7, 2021

To improve the display of the function description on hover, can you provide support for the
tag in the ---@param line to enter a line breaks without adding spaces between lines?

<br> is disabled by VSCode.

@sumneko sumneko closed this as completed in 8123dd3 May 7, 2021
@serg3295
Copy link
Contributor Author

serg3295 commented May 8, 2021

The current rules of comments showing are already very complicated, and I don't want to further increase his complexity.

OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority.high A high priority topic
Projects
None yet
Development

No branches or pull requests

2 participants