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

fix: bind variables with @class using tail comments #3044

Merged
merged 1 commit into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* `FIX` Fixed the error that the configuration file pointed to by the `--configpath` option was not read and loaded.
* `FIX` Generic return can be optional.
* `FIX` Fixed the comment calculating in docs `---@param a string?Comment` - now its `Comment` instead of `omment`.
* `FIX` Fixed cannot bind variables using tail comment `@class` [#2673](https://github.com/LuaLS/lua-language-server/issues/2673)
* `NEW` `---@class` supports attribute `partial`, which will not check missing inherited fields [#3023](https://github.com/LuaLS/lua-language-server/issues/3023)
```lua
---@class Config
Expand Down
2 changes: 1 addition & 1 deletion script/parser/luadoc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2181,7 +2181,7 @@ local function bindDocs(state)
if doc.specialBindGroup then
bindDocWithSources(sources, doc.specialBindGroup)
binded = nil
elseif isTailComment(text, doc) and doc.type ~= "doc.class" and doc.type ~= "doc.field" then
elseif isTailComment(text, doc) and doc.type ~= "doc.field" then
bindDocWithSources(sources, binded)
binded = nil
else
Expand Down
Loading