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

Unable to detect any of global variables #1036

Closed
SirZenith opened this issue Apr 11, 2022 · 1 comment
Closed

Unable to detect any of global variables #1036

SirZenith opened this issue Apr 11, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@SirZenith
Copy link

Describe the bug
Whenever a global variable is used, language server throw an "Undefined global" warning.

To Reproduce
Steps to reproduce the behavior:

  1. Create a file containing following code:

    Test = "foo"
    print(Test)
    
  2. Warning should be popping up an the line we print Test.

Screenshots
image

Environment:

  • OS: Ubuntu WSL and Android
  • Is WSL remote? No.
  • Client: neovim with native LSP

Additional context
Current lua-language-server version 3.0.0

Provide logs

[17:38:27.427][info] [#0:/home/luli/Applications/lua-language-server-3.0.0-linux-x64/main.lua:65]: Lua Lsp startup, root: 	/home/luli/Applications/lua-language-server-3.0.0-linux-x64
[17:38:27.427][info] [#0:/home/luli/Applications/lua-language-server-3.0.0-linux-x64/main.lua:66]: ROOT:	/home/luli/Applications/lua-language-server-3.0.0-linux-x64
[17:38:27.427][info] [#0:/home/luli/Applications/lua-language-server-3.0.0-linux-x64/main.lua:67]: LOGPATH:	/home/luli/Applications/lua-language-server-3.0.0-linux-x64/log
[17:38:27.427][info] [#0:/home/luli/Applications/lua-language-server-3.0.0-linux-x64/main.lua:68]: METAPATH:	/home/luli/Applications/lua-language-server-3.0.0-linux-x64/meta
[17:38:27.427][info] [#0:/home/luli/Applications/lua-language-server-3.0.0-linux-x64/main.lua:69]: VERSION:	3.0.0
[17:38:27.460][info] [#0:script/service/service.lua:141]: 
========= Medical Examination Report =========
    --------------- Memory ---------------
        Total: 1.337 MB
        # 00 : 1.337 MB
        # 01 : 0.000 MB
        # 02 : 0.000 MB
        # 03 : 0.000 MB
        # 04 : 0.000 MB
    --------------- Coroutine ---------------
        Total:     0
        Running:   0
        Suspended: 0
        Normal:    0
        Dead:      0
    --------------- Cache ---------------
        Total: 1
        Dead:  0
    ---------------  RPC  ---------------
        Holdon:   0
        Waiting:  0
==============================================
[17:38:27.565][info] [#0:script/language.lua:135]: VSC language: nil
[17:38:27.565][info] [#0:script/language.lua:136]: LS  language: en-us
[17:38:27.671][info] [#0:script/provider/provider.lua:52]: Load config from client	fallback
[17:38:27.671][info] [#0:script/library.lua:207]: Init builtin library at:	nil
[17:38:27.689][info] [#0:script/plugin.lua:80]: plugin path:	nil
[17:38:27.689][info] [#0:script/provider/provider.lua:52]: Load config from client	fallback
[17:38:27.689][info] [#0:script/workspace/workspace.lua:278]: Preload start:	<fallback>
[17:38:27.689][info] [#0:script/workspace/workspace.lua:294]: Scan library at:	file:///home/luli/Applications/lua-language-server-3.0.0-linux-x64/meta/Lua%205.4%20en-us%20utf8
[17:38:27.690][warn] [#0:script/proto/proto.lua:122]: Response of [workspace/semanticTokens/refresh] error [-32601]: MethodNotFound
[17:38:27.690][warn] [#0:script/proto/proto.lua:122]: Response of [workspace/semanticTokens/refresh] error [-32601]: MethodNotFound
[17:38:29.483][info] [#0:script/workspace/workspace.lua:308]: Found 11 files at:	<fallback>
[17:38:29.519][info] [#0:script/workspace/loading.lua:154]: Loaded finish.
[17:38:29.519][info] [#0:script/workspace/workspace.lua:310]: Preload finish at:	<fallback>
[17:38:29.519][info] [#0:script/provider/diagnostic.lua:388]: Diagnostics scope [<fallback>], files count:[12]
[17:38:29.524][info] [#0:script/provider/diagnostic.lua:405]: Diagnostics scope [<fallback>] finished, takes [0.005] sec.
[17:38:33.483][info] [#0:script/provider/diagnostic.lua:388]: Diagnostics scope [<fallback>], files count:[11]
[17:38:33.483][info] [#0:script/provider/diagnostic.lua:405]: Diagnostics scope [<fallback>] finished, takes [0.000] sec.
@SirZenith SirZenith changed the title Language server unable to detect any of global variables unable to detect any of global variables Apr 11, 2022
@SirZenith SirZenith changed the title unable to detect any of global variables Unable to detect any of global variables Apr 11, 2022
@SirZenith
Copy link
Author

And this is not happening in VS Code with server version 3.0.0

@sumneko sumneko added the bug Something isn't working label Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants