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

Closing the infoview buffer causes errors #20

Closed
gebner opened this issue May 25, 2021 · 3 comments
Closed

Closing the infoview buffer causes errors #20

gebner opened this issue May 25, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@gebner
Copy link
Collaborator

gebner commented May 25, 2021

When I (accidentally) close the infoview buffer, the following error repeats very quickly:

Error executing vim.schedule lua callback: /home/gebner/lean.nvim/lua/lean/infoview.lua:61: Invalid buffer id: 3

It would also be nice to have commands to reopen or toggle the infoview.

@Julian
Copy link
Owner

Julian commented May 25, 2021

Toggling is present already -- it's mapped to <localleader>i if you have mappings = true in the config (or if you called .use_suggested_mappings()). Or you can map lua require'lean.infoview'.toggle() to whatever you'd like obviously.

The first one is a known issue though yeah -- I put it in a subcomment of #17 ("automatically disable the infoview when it is :q'ed") but probably better to leave this open and have it be its own issue.

Shouldn't be hard to fix.

@Julian Julian added the bug Something isn't working label May 25, 2021
@gebner
Copy link
Collaborator Author

gebner commented May 25, 2021

Then I misread the subcomment! I thought you meant calling :q on the lean buffer would automatically close the infoview, which would also be useful.

@Julian
Copy link
Owner

Julian commented May 25, 2021

Ah! Yes agree on that one too -- I think that one we should make be configurable, I go back and forth on whether I want vim to autoquit if the infoview is the last buffer open -- sometimes I mean to continue opening some lean file and sometimes I'm done, but if we make it configurable I think that one's also a good idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants