LuaLS / lua-language-server

A language server that offers Lua language support - programmed in Lua
https://luals.github.io
MIT License
3.33k stars 316 forks source link

ngx.status prompts problem on valid form #1690

Open xiangnanscu opened 1 year ago

xiangnanscu commented 1 year ago

How are you using the lua-language-server?

Visual Studio Code Extension (sumneko.lua)

Which OS are you using?

Windows WSL

What is the issue affecting?

Diagnostics/Syntax Checking

Expected Behaviour

no problem

Actual Behaviour

image

Reproduction steps

Just type ngx.status = ngx.HTTP_NOT_FOUND

Additional Notes

No response

Log File

No response

xiangnanscu commented 1 year ago

v3.6.2

sumneko commented 1 year ago

I cannot reproduce it, what's your settings?

xiangnanscu commented 1 year ago
{
  "Lua.runtime.version": "LuaJIT",
  "Lua.diagnostics.globals": [
    "ngx",
    "xodel",
    "loger"
  ],
  "files.autoSave": "onFocusChange",
  "Lua.workspace.library": [
    "${3rd}/OpenResty/library"
  ],
  "Lua.runtime.unicodeName": true,
  "editor.formatOnPaste": false,
  "Lua.typeFormat.config": {
    "format_line": "false",
    "auto_complete_end": "false",
    "auto_complete_table_sep": "false"
  },
  "[conf]": {
    "editor.formatOnSave": false
  },
  "Lua.workspace.checkThirdParty": false
}
sumneko commented 1 year ago

Still cannot reproduce this. Can you provide a demo project?

sumneko commented 1 year ago

Please check if this commit fixed it: 21ee5e8a7393e936f2c36d5628e2a307750f4ff5

xiangnanscu commented 1 year ago

fixed. but now ngx.status = 'aa' won't show error too. never mind, I don't care this :-)