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 when leaving neovim in background for grace period #1

Closed
tannerellen opened this issue Nov 6, 2023 · 6 comments
Closed

Error when leaving neovim in background for grace period #1

tannerellen opened this issue Nov 6, 2023 · 6 comments

Comments

@tannerellen
Copy link

If I leave a file open with neovim in the background for the grace period length then come back to neovim there is an error...

Error executing vim.schedule lua callback: ...are/nvim/lazy/garbage-day.nvim/lua/garbage-day/utils.lua:21: attempt to call field 'get_clients' (a nil value)

Screenshot 2023-11-05 at 8 07 47 PM

This is in a javascript file attached is my :LspInfo

Screenshot 2023-11-05 at 8 33 23 PM
@Zeioth
Copy link
Owner

Zeioth commented Nov 6, 2023

@tannerellen what nvim version are you using? We only support nvim v0.9, v0.10 or upper (it's in the readme).

In nvim 0.8 of lower, nvim uses get_active_clients() instead of get_clients(), which causes that error. If this is your case, you can use lsp-timeout which is quite similar.

@Numkil
Copy link

Numkil commented Nov 6, 2023

@Zeioth I have the same error with the grace period. I'm on nvim 0.9.4 on macos.

Screenshot 2023-11-06 at 16 50 41

@tannerellen
Copy link
Author

@Zeioth Sorry I meant to say I am using nvim v0.9.4 on Ubuntu.

Screenshot 2023-11-06 at 9 18 23 AM

@Zeioth
Copy link
Owner

Zeioth commented Nov 6, 2023

Ok it seems neovim start saying something is deprecated as soon as they push the changes to git (v0.10).

EDIT: @tannerellen @Numkil I've pushed the fix, you should be able to use it on nvim 0.9 now too.

@Numkil
Copy link

Numkil commented Nov 6, 2023

Yes that works wonderfully! thanks!

@tannerellen
Copy link
Author

That did the trick. Thanks!

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

3 participants