LuaLS / LuaLS/lua-language-server

Way to disable HTML tags in hover block

未关闭
#3,010 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Lua
星标
4.4k
派生
442
PR 合并指标
30 天内没有已合并 PR

描述

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

{3779F4A5-C19D-4E30-94AC-29FDC491F3DD}

It ate my names, they're not html tags.

Reproduction steps
  1. Place anything in angle brackets in your comment
  2. 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

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先跟踪 Lua language server 的 hover 渲染和配置路径,并将所引用的 #996 supportHtml 行为作为对比。检查 workspace、.luarc 和用户设置的读取方式,然后在 VS Code extension 中复现尖括号示例。当 markdown 保持启用,同时可以按项目或通过用户设置禁用 HTML 标签解释时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
lua, vscode
领域
developer-experience, tooling
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。