LuaLS / LuaLS/lua-language-server
`[meta]` annotations should be loaded instead of just reading the file
Đang mở
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Lua
- Star
- 4.4k
- Fork
- 442
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
MacOS
What is the issue affecting?
Annotations, Libraries
Expected Behaviour
{
"Lua.workspace.checkThirdParty": false,
"diagnostics.groupSeverity": {
"ambiguity": "Error",
"await": "Error",
"codestyle": "Error",
"duplicate": "Hint",
"global": "Error",
"luadoc": "Error",
"redefined": "Information",
"strict": "Error",
"strong": "Error",
"type-check": "Error",
"unbalanced": "Error",
"unused": "Hint",
"conventions": "Error"
},
"diagnostics.disable": [
"duplicate-doc-alias",
"duplicate-doc-field"
],
// "runtime.path": [
// "?.lua",
// "?/init.lua",
// ],
"runtime.pathStrict": true,
"runtime.version": "LuaJIT",
"workspace.ignoreDir": [
".vscode",
".luarocks"
],
"workspace.library": [
"/Users/frityet/Library/Application Support/Code/User/globalStorage/sumneko.lua/addonManager/addons/penlight/module/library",
"${3rd}/lfs/library",
"lua_modules/lib/lua/5.1/",
"lua_modules/share/lua/5.1/",
"/Users/frityet/Library/Application Support/Code/User/globalStorage/sumneko.lua/addonManager/addons/openresty/module/library"
],
"diagnostics.globals": [
"ngx"
],
}
local stringio = require("pl.stringio")
stringio should use the definition from meta
Actual Behaviour
it reads the real pl.stringio and uses that (which does have't luaLS annotations, etc)
Reproduction steps
- Download and load penlight into a directory
- Add the penlight addon
requirea penlight file
Additional Notes
No response
Log File
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách theo dõi cách require("pl.stringio") phân giải addon Penlight và cách các chú thích [meta] được xử lý, đồng thời so sánh đường đi đó với tệp pl.stringio thực tế. Được xem là hoàn thành khi require sử dụng định nghĩa từ các chú thích meta, bao gồm cả các chú thích LuaLS của chúng, thay vì tệp runtime không có chú thích.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- lua
- Lĩnh vực
- devtools
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100