Skip to content

怎么给第三方库增加变量提示? #2150

@zhanlangorz

Description

@zhanlangorz

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?

Diagnostics/Syntax Checking

Expected Behaviour

希望可以不提示代码里给openresty ngx 全局变量注入的函数错误。

Actual Behaviour

有什么方案可以让lls识别到我注入进去的函数?

Reproduction steps

我用openresty的库, 然后自己写的代码, 为了方便, 会往ngx全局变量添加几个日志函数。 比如
ngx.err

然后使用的时候, 就会出现undefined-field: err 错误。

Additional Notes

No response

Log File

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionUser has a question

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions