-
Notifications
You must be signed in to change notification settings - Fork 11
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
toggle/show on start broke the plugin #26
Comments
Using the latest main branch it worked for me just now. Could you try again with the latest main branch code? |
I've tried the latest main branch and it does work indeed again, however not for cursorline only. If I put the cursorline only setting, I have to go now to a line, toggle it on with the keybind, and then it shows there permanently. If I want another line, I have to go there, toggle off, and toggle on again. I remember before, that cursorline was showing the info dynamically on whatever line you were on at the moment, that was great. |
I am unable to reproduce this on a mac with the homebrew installed version:
I then tried
Could you list what OS and version you are on? |
Here is a better explanation: This config:
So it's all working as expected, and I'm using the keybind to toggle. So far so good. Now, this config with the
Again I'm using the keybind to toggle. Then I have to press toggle -> it deletes line above. Then toggle again, to show it on the current line. So the issue is, that like a week ago the Do you have the same behaviour or does that actually work for you? |
Yes this actually works for me. We tested and toggled as much as we could on stream. Could not reproduce your issue. What is your OS? |
I did a lot more testing and found out a few things. First of all, my machines are on macOS 10.15.2 and 11.6.1 They behave the same. I now noticed that it’s the files that make the difference. In most files it works as expected, but I have some large ts files that don’t work, and also some large tsx files that don’t. Also sometimes it works fine, and then after editing a large file it stops working, even in smaller files. Restarting vim then makes it work again in the small file at least. I don’t know what exactly is causing this, and I’ll have to keep watching until I find a way to reproduce. It could be an interference with other plugins, or keybindings, or maybe when treesitter reaches a point that there is an error in the code it can’t parse all the way down then it locks up. I’ll try to investigate further. |
I can reproduce this. I just installed nvim-biscuits for the first time and couldn't get it to work as expected. The way in which it's broken resembles this report. When I rolled back to d1bb237 it worked as expected. More specifically: on HEAD, it didn't seem to work on startup at all, even with I'm also on macOS (13), and I'm using neovim 0.8.1 from homebrew. |
Hmm, I still cannot reproduce, but I only have a few plugins. Can you list your other plugins? I only have these:
I could be doing something very wrong though. I don't use neovim enough to know what though. |
How about this, are either of you able to hop into my Twitch Stream to help me figure this out? We would use Twitch Guest Stars and it might take some kind of OBS setup to share the screen via that, but I would be happy to try it out. The ideal days for these are Sundays for me. (Pacific time). But I can set time aside for any day that works for either of you. |
OK, nvm. I think we discovered the issue. It has to do with the |
It seems to me that this conditional is the issue — shouldn't the We want to render the biscuits if the user hasn't set a keybinding; we also want to render them if the user has set a keybinding and has set The following appears to work for me: if (not toggle_keybind) or config.get_language_config(final_config, lang, "show_on_start") then
nvim_biscuits.decorate_nodes(bufnr, lang)
else
nvim_biscuits.should_render_biscuits = false
end |
As a further note. I believe most of the issue was fixed by @benjamineskola. However, I think I had also uncovered a couple edge cases regarding specific languages and sometimes an edge case where there was no proper bufnr to attach to. Try it with the latest changes. (Ben's and mine) |
Everything was working fine yesterday (Nov 9, early morning update before the toggle/show on start commits), today after updating it doesn't work anymore.
I have added the
show_on_start
to the configBut nothing is shown.
When I use the toggle key, either binding it in the config or manually with
require('nvim-biscuits').toggle_biscuits()
it does toggle it, but only for the one line the cursor is on, and then this one stays.No other line gets displayed. If I go to another line, then toggle again, the previous one hides, toggle again, then the current line (and only this one) toggles.
If I toggle it on a line that doesn't have a closing bracket, nothing happens at all.
The text was updated successfully, but these errors were encountered: