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

TodoTrouble issues #130

Closed
ghost opened this issue Sep 17, 2022 · 2 comments · Fixed by #174
Closed

TodoTrouble issues #130

ghost opened this issue Sep 17, 2022 · 2 comments · Fixed by #174

Comments

@ghost
Copy link

ghost commented Sep 17, 2022

If I haven't launched Trouble before and I launch TodoTrouble, it launches Trouble with all files in the cwd. However, if Trouble has already been launched, TodoTrouble will throw an error, saying that the buffer ID is invalid. In other words, TodoTrouble is not working.

The error I get after launching Trouble, then TodoTrouble:
Error executing vim.schedule lua callback: ...myNeovimPackages/start/trouble.nvim/lua/trouble/view.lua:452: Vim(luafile):E5113: Error while calling lua chunk: ...start/todo-comments.nvim/lua/todo-comments/highlight.lua:284: Invalid buffer id: 17

OS: NixOS Unstable
Neovim: Nightly
I'm lazyloading the plugin on BufRead and BufNewFile using autocmds that run packadd and luafile.

I can try to provide more details as necessary.

EDIT: After hitting enter on the error, TodoTrouble launches as usual. However, if I close it and launch it again after that, the same issue will happen as if I launched it before launching Trouble (it launches Trouble with all files in cwd).

EDIT 2: It seems that it always throws an Invalid buffer id error, and the ID is always the same as the newest buffer's ID + 1. I've tested this after opening one buffer, as well as after opening multiple buffers.

EDIT 3: The problem goes away entirely if I stop lazyloading the plugins (todo-comments and trouble), but I want to lazyload to keep loading times down. If I find a fix, I'll relay.

@folke folke closed this as completed in f990cd9 Sep 17, 2022
@folke
Copy link
Owner

folke commented Sep 17, 2022

I just pushed an update that might fix your issue.

I'm also lazy loading those two plugins, but don't have the issue you mentioned

@ghost
Copy link
Author

ghost commented Sep 17, 2022

I found out that the way NixOS handles plugins incorrectly, so the issue may be on my end. I'll update if I find any new info. In the meantime, 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

Successfully merging a pull request may close this issue.

1 participant