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

Error ON_ATTACH_ERROR: ".../navigator.lua/lua/navigator/codeAction.lua:209: bad argument #1 to 'next' (table expected, got nil)" #317

Open
Leandros opened this issue Dec 22, 2024 · 0 comments

Comments

@Leandros
Copy link

After the last update, the config shown in the README of navigator.lua throws an error:

Error ON_ATTACH_ERROR: ".../navigator.lua/lua/navigator/codeAction.lua:209: bad argument #1 to 'next' (table expected, got nil)"

Error is here in codeAction.lua on line 209.

My assumption is, that the only variable introduced in 53efe4b5cea5e99d2216449330f205d71251fdc7 must be set, which it isn't, as documented in the readme:

-- excerpt from navigator.lua readme
  on_attach = function(client, bufnr)
    require("navigator.lspclient.mapping").setup({ client = client, bufnr = bufnr }) -- setup navigator keymaps here,
    require("navigator.dochighlight").documentHighlight(bufnr)
    require("navigator.codeAction").code_action_prompt(bufnr)

Calling code_action_prompt with an empty table require("navigator.codeAction").code_action_prompt(bufnr, {}) silences the error.

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