-
-
Notifications
You must be signed in to change notification settings - Fork 341
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: script/core/hint.lua:320: attempt to index a nil value (local 'last') #2788
Comments
Is this a typo? Latest version is 3.10.3. And please share a concrete (minimal) file to test with. (Just because the error occurred with every file you happened to test with doesn't mean it'll occur with every file. I for example cannot reproduce the error.) It's also important to show how you
|
Insights to this issue
This logic is under the if case
=> So this issue happens only when ReproductionThe default value for
{
"hint.enable": true,
"hint.semicolon": "All"
}
AnalysisI guess when a block (global scope / if case / etc.) have no statement, the
Proposed fixI believe a simple fix like checking if mode == 'All' and #src > 0 then
local last = src[#src]
... |
No it's not. I use the latest version from nixpkgs unstable, which does seem to lag behind somewhat (because with nix multiple pkgs are updated at once, but only if/when all of them pass tests and don't error). Vim plugins and lua pkgs are usually 1-2 weeks behind.
Sorry but I don't have one at this point, but I'll update my OP to include the config I'm using. The error actually appears at "random", but often enough to be annoying. From the error message ( |
How are you using the lua-language-server?
NeoVim 0.10.1
LuaLS 3.9.3
Which OS are you using?
MacOS
What is the issue affecting?
Other
Expected Behaviour
no error
Actual Behaviour
Almost every time I open a file in my editor, I get this error (multiple at a time):
Reproduction steps
Open an existing Lua file in neovim.
Additional Notes
Config:
Log File
No response
The text was updated successfully, but these errors were encountered: