LuaLS / LuaLS/lua-language-server

Workspace loading: 0 / 0

Open
#2,336 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Non VS Code
Dominant language
Lua
Stars
4.4k
Forks
442
PR merge metrics
No merged PRs in 30d

Description

How are you using the lua-language-server?

Other

Which OS are you using?

Linux

What is the issue affecting?

Hover

Expected Behaviour

I expected the result of the hover

Actual Behaviour

{"id":3,"jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"Workspace loading: 0 / 0"}}}

Reproduction steps

Am creating an lsp client

Additional Notes

No response

Log File
Log file
[23:28:07.103][info] [#0:/usr/lib/lua-language-server/main.lua:66]: Lua Lsp startup, root: 	/usr/lib/lua-language-server
[23:28:07.103][info] [#0:/usr/lib/lua-language-server/main.lua:67]: ROOT:	/usr/lib/lua-language-server
[23:28:07.103][info] [#0:/usr/lib/lua-language-server/main.lua:68]: LOGPATH:	../../../log
[23:28:07.103][info] [#0:/usr/lib/lua-language-server/main.lua:69]: METAPATH:	/tmp/lua-language-server-1000/instance.FGRv/meta
[23:28:07.103][info] [#0:/usr/lib/lua-language-server/main.lua:70]: VERSION:	<Unknown>
[23:28:07.135][debug][#0:script/pub/pub.lua:50]: Create brave:	1
[23:28:07.135][debug][#0:script/pub/pub.lua:50]: Create brave:	2
[23:28:07.136][debug][#0:script/pub/pub.lua:50]: Create brave:	3
[23:28:07.136][debug][#0:script/pub/pub.lua:50]: Create brave:	4
[23:28:07.136][info] [#0:script/service/service.lua:144]: 
========= Medical Examination Report =========
    --------------- Memory ---------------
        Total: 2.115 MB
        # 00 : 2.115 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
==============================================
[23:28:07.339][info] [#0:script/proto/proto.lua:25]: rpc recieve:	{"id":2,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":[],"processId":24039}}
[23:28:07.340][info] [#0:script/client.lua:657]: Client init	{
  capabilities = {},
  processId = 24039
}
[23:28:07.340][info] [#0:script/language.lua:137]: VSC language: nil
[23:28:07.340][info] [#0:script/language.lua:138]: LS  language: en-us
[23:28:07.342][debug][#0:script/provider/provider.lua:129]: Server init	{
  capabilities = {
    codeActionProvider = {
      codeActionKinds = { "", "quickfix", "refactor.rewrite", "refactor.extract" },
      resolveProvider = false
    },
    codeLensProvider = {
      resolveProvider = true
    },
    colorProvider = true,
    completionProvider = {
      resolveProvider = true,
      triggerCharacters = { "\t", "\n", ".", ":", "(", "'", '"', "[", ",", "#", "*", "@", "|", "=", "-", "{", " ", "+", "?" }
    },
    definitionProvider = true,
    documentFormattingProvider = true,
    documentHighlightProvider = true,
    documentOnTypeFormattingProvider = {
      firstTriggerCharacter = "\n"
    },
    documentRangeFormattingProvider = true,
    documentSymbolProvider = true,
    executeCommandProvider = {
      commands = { "lua.removeSpace", "lua.solve", "lua.jsonToLua", "lua.setConfig", "lua.getConfig", "lua.autoRequire" }
    },
    foldingRangeProvider = true,
    hoverProvider = true,
    inlayHintProvider = {
      resolveProvider = true
    },
    offsetEncoding = "utf-16",
    referencesProvider = true,
    renameProvider = {
      prepareProvider = true
    },
    semanticTokensProvider = {
      full = true,
      legend = {
        tokenModifiers = { "declaration", "definition", "readonly", "static", "deprecated", "abstract", "async", "modification", "documentation", "defaultLibrary", "global" },
        tokenTypes = { "namespace", "type", "class", "enum", "interface", "struct", "typeParameter", "parameter", "variable", "property", "enumMember", "event", "function", "method", "macro", "keyword", "modifier", "comment", "string", "number", "regexp", "operator", "decorator" }
      },
      range = true
    },
    signatureHelpProvider = {
      triggerCharacters = { "(", "," }
    },
    textDocumentSync = {
      change = 2,
      openClose = true,
      save = {
        includeText = false
      }
    },
    typeDefinitionProvider = true,
    workspace = {
      fileOperations = {
        didRename = {
          filters = {}
        }
      },
      workspaceFolders = {
        changeNotifications = true,
        supported = true
      }
    },
    workspaceSymbolProvider = true
  },
  serverInfo = {
    name = "sumneko.lua"
  }
}
[23:28:07.342][info] [#0:script/proto/proto.lua:18]: rpc send:	Content-Length: 1759

{"id":2,"jsonrpc":"2.0","result":{"capabilities":{"codeActionProvider":{"codeActionKinds":["","quickfix","refactor.rewrite","refactor.extract"],"resolveProvider":false},"codeLensProvider":{"resolveProvider":true},"colorProvider":true,"completionProvider":{"resolveProvider":true,"triggerCharacters":["\t","\n",".",":","(","'","\"","[",",","#","*","@","|","=","-","{"," ","+","?"]},"definitionProvider":true,"documentFormattingProvider":true,"documentHighlightProvider":true,"documentOnTypeFormattingProvider":{"firstTriggerCharacter":"\n"},"documentRangeFormattingProvider":true,"documentSymbolProvider":true,"executeCommandProvider":{"commands":["lua.removeSpace","lua.solve","lua.jsonToLua","lua.setConfig","lua.getConfig","lua.autoRequire"]},"foldingRangeProvider":true,"hoverProvider":true,"inlayHintProvider":{"resolveProvider":true},"offsetEncoding":"utf-16","referencesProvider":true,"renameProvider":{"prepareProvider":true},"semanticTokensProvider":{"full":true,"legend":{"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary","global"],"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator","decorator"]},"range":true},"signatureHelpProvider":{"triggerCharacters":["(",","]},"textDocumentSync":{"change":2,"openClose":true,"save":{"includeText":false}},"typeDefinitionProvider":true,"workspace":{"fileOperations":{"didRename":{"filters":[]}},"workspaceFolders":{"changeNotifications":true,"supported":true}},"workspaceSymbolProvider":true},"serverInfo":{"name":"sumneko.lua"}}}
[23:28:07.345][info] [#0:script/proto/proto.lua:18]: rpc send:	Content-Length: 120

{"jsonrpc":"2.0","method":"$/status/report","params":{"text":"😺Lua","tooltip":"Cached files: 0/0\nMemory usage: 2M"}}
[23:28:07.445][info] [#0:script/proto/proto.lua:25]: rpc recieve:	{"id":3,"jsonrpc":"2.0","method":"textDocument/hover","params":{"position":{"character":1,"line":1},"textDocument":{"uri":"file:///home/codotaku/Documents/Projects/project1/test.lua"}}}
[23:28:07.445][info] [#0:script/proto/proto.lua:18]: rpc send:	Content-Length: 101

{"id":3,"jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"Workspace loading: 0 / 0"}}}
[23:28:14.042][warn] [#0:script/pub/report.lua:25]: Load proto error:	Disconnected!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the initialization and hover request flow shown in script/client.lua and script/provider/provider.lua, using the log entries from script/proto/proto.lua. Check how the workspace-loading status reaches the hover response and compare it with script/pub/report.lua; done means the reported hover request produces the expected result rather than "Workspace loading: 0 / 0".

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.