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

attempt to concatenate a nil value (field 'sep') [I have workaround] #2944

Open
VVeaz opened this issue Nov 8, 2024 · 0 comments
Open

attempt to concatenate a nil value (field 'sep') [I have workaround] #2944

VVeaz opened this issue Nov 8, 2024 · 0 comments

Comments

@VVeaz
Copy link

VVeaz commented Nov 8, 2024

Hello. I'm getting this bug but I've add one if in template.lua and it works for me but I dont know is it good. I hope someone can help me become smarter.

How are you using the lua-language-server?

Other

Which OS are you using?

Windows

What is the issue affecting?

Completion

Expected Behaviour

Lua syntax suggestions

Actual Behaviour

No suggestion

Reproduction steps

  1. Im using lua-language-server-3.12.0-win32-x64.zip at windows 11 with custom monaco editor in react app and proxy https://github.com/wylieconlon/jsonrpc-ws-proxy
  2. Im just refreshing page with monaco editor
  3. i'm getting error
[12:57:54.533][error][#0:script\config\template.lua:157]: script\config\template.lua:157: attempt to concatenate a nil value (field 'sep')
stack traceback:
	script\config\template.lua:157: in method 'loader'
	script\config\config.lua:66: in function 'config.config.setByScope'
	script\config\config.lua:217: in local 'expand'
	script\config\config.lua:229: in function 'config.config.update'
	script\provider\provider.lua:59: in function 'provider.updateConfig'
	script\provider\provider.lua:142: in function <script\provider\provider.lua:140>
	[C]: in function 'xpcall'
	script\proto\proto.lua:202: in function <script\proto\proto.lua:177>
[12:58:12.112][warn] [#0:script\proto\proto.lua:189]: Method [textDocument/codeAction] takes [17.689]sec. {
  _closeMessage = "Request cancelled.",
  _closeReason = -32800,
  id = 4,
  jsonrpc = "2.0",
  method = "textDocument/codeAction",
  params = {
    context = {
      diagnostics = {},
      triggerKind = 2
    },
    range = {
      end = {
        character = 0,
        line = 0
      },
      start = {
        character = 0,
        line = 0
      }
    },
    textDocument = {
      uri = "file:///MY_PATH"
    }
  }
}

and no syntax suggestion

Additional Notes

I have simply wrote it in script/config/template.lua :

		log.info(self.sep)
		log.info("----- value-----")
		log.info(value)
		if self.sep then
			log.info("----- self.sep 2 -----")
			log.info(self.sep)
			for s in value:gmatch('[^' .. self.sep .. ']+') do
				t[s] = true
			end
		end```

now it works perfect

value is always
`configuredByTheme`

### Log File

[logs_bug.txt](https://github.com/user-attachments/files/17679384/logs_bug.txt)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant