LuaLS / LuaLS/lua-language-server

使用注解遇到的问题.

Open
#316 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement feat/LuaCats Annotations priority.low
Dominant language
Lua
Stars
4.4k
Forks
442
PR merge metrics
No merged PRs in 30d

Description

名称 版本
visual studio code v1.52.1
lua-language-server v1.7.4

遇到的问题

使用注解@language的语法高亮不生效.

测试方式

1. 源码文件是这样的:
local str = [[{
  "code": 200
}]]

---@language JSON
local js1 = [[{
  "code": 200
}]]

---@language Json
local js2 = [[{
  "code": 200
}]]

---@language json
local js3 = [[{
  "code": 200
}]]

print(str, js1, js2, js3)
2. 实际的显示效果:

image

3. 可以确定和主题无关, 即使禁用与卸载主题依然如此.

image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the report in Visual Studio Code v1.52.1 with lua-language-server v1.7.4 using the Lua sample containing the @language JSON, Json, and json annotations. Compare the rendered highlighting with and without the annotations; done means the reported annotation behavior is understood and the expected highlighting outcome is confirmed. No source files or tests are named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, vscode
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.