-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
[BUG] Lose color on file when switch session? #198
Comments
after switched session, if i issue |
This is entirely outside of auto-session's control. If I were to guess, something with your plugins is causing this, some form of incorrectly configured lazy loading can be a common cause for treesitter not loading. |
it happens with other colorscheme too. i use your treesitter config: https://github.com/rmagatti/dotfiles/blob/master/nvim/lua/rmagatti/treesitter.lua#L109 i saw you use packer instead of lazy.vim, can that be problem? (as in picture, i've set the priority to 999 and lazy load is set to false) |
@tmpm697 your issue also sounds similar to an issue I had a while back. Here's a commit I made where I describe why it was happening to me. |
Now i try with this minimal init.lua config:
Why with above minimal config I always get error when source session vim file? this is nvim nightly @rmagatti Edit: if i cd to /home/user/.local/share/nvim/sessions and
|
I tried |
I'm guessing but this issue can be auto-session tried to remove/clear current buffers before switching? |
yeah this caused the issue: https://github.com/rmagatti/auto-session/blob/main/lua/auto-session-autocmds.lua#L44 |
can you help to clarify why you need to check for I don't seem to find out the code that you call to clean up buffers before switching, can you point it out? |
Weird that if i use auto-session and let it save some sessions, then disable it and open nvim to manually |
If i enable debug mode, i got this:
so why these values are empty?
If i
|
this issue seems from https://github.com/noib3/nvim-cokeline that does not clean all buffers but keep minimal one, it probably overwrite if i do |
To be clear, this still has nothing to do with auto-session. It's the combination of your plugins and the order of operations of those plugins loading that seem to be causing issues for you. Auto Session does not control whether color or really anything else gets restored, that's controlled by vim's own session management, auto-session merely wraps that. |
sorry for still posting into this already closed issue... but ... it seems that the
I don't know though, whether this "problem" should be fixed on the |
Describe the bug
when i switch session, color on file not appear correctly (less colors)
To Reproduce
Steps to reproduce the behavior:
the color corrects again if i open new file to edit or switch to other buffers and then switch back -- meaning if you just switch to other session and stay and keep use the buffer that restored session bring you in, that buffer is not colored correctly and it'll keep it that way unless you change buffer that somehow will trigger to re-correct the color.
Expected behavior
color display same as when edit file
Screenshots
after switched session:
use normally (expected behavior):
Baseline (please complete the following information):
set sessionoptions?
: sessionoptions=blank,buffers,curdir,folds,help,tabpages,winsize,terminaluname -a
: archlinuxnvim --version
nightlyAdditional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: