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

warning I do not understand #976

Closed
ghost opened this issue Mar 7, 2022 · 2 comments
Closed

warning I do not understand #976

ghost opened this issue Mar 7, 2022 · 2 comments
Labels
bug Something isn't working Info Needed More information is required

Comments

@ghost
Copy link

ghost commented Mar 7, 2022

Describe the bug
I have a configuration file for neovim in lua with the content

M = {}

function M.setup()
  local nls = require 'nulls-ls'
  local sources = { nls.builtins.formatting.stylua }
  nls-setup { sources=sources } W: Only has 0 variables, but you set 1 values.
end

return M

I am looking into insight into what this warning means in order to determine if it is legitimate.

@sumneko sumneko added the bug Something isn't working label Mar 7, 2022
@sumneko
Copy link
Collaborator

sumneko commented Mar 8, 2022

I cannot reproduce it, this line nls-setup { sources=sources } W: Only has 0 variables, but you set 1 values. is invalid Lua code, please provide the valid code.

@sumneko sumneko added the Info Needed More information is required label Mar 8, 2022
@haolian9
Copy link

it seems to be a localization problem.

locale/zh-cn says:

DIAG_OVER_MAX_ARGS      =
'函数只接收 {:d} 个参数,但你传了 {:d} 个。'

while locale/en-us says:

DIAG_OVER_MAX_ARGS      =
'The function takes only {:d} parameters, but you passed {:d}.'
DIAG_OVER_MAX_ARGS      =
'Only has {} variables, but you set {} values.'

sumneko added a commit that referenced this issue Mar 12, 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 Info Needed More information is required
Projects
None yet
Development

No branches or pull requests

2 participants