Bug: scrollbind causes inconsistent rendering
Describe the bug
Colorizer works inconsistently on split panes with 'scrollbind' set.
To Reproduce
require("colorizer").setup({
filetypes = {
"css",
"typescriptreact",
"vim",
},
})
Open both colorschemes from this repo in split panes: https://github.com/pappasam/papercolor-theme-slim
Expected behavior I expect colorizer to work on both panes.
Screenshots
Without scrollbind
With scrollbind
Operating System: Ubuntu 24.04
Neovim Version: NVIM v0.11.0-dev Build type: RelWithDebInfo LuaJIT 2.1.1703358377
Have you tried with always_update = true
@catgoose yep, same result with this configuration:
require("colorizer").setup({
filetypes = {
"css",
"typescriptreact",
"vim",
},
user_default_options = {
always_update = true,
},
})
This is what I get when I run make minimal in colorizer repo, set scrollbind to both panes and scroll:
Can you try with the minimal config and see what happens?
I tried it with the same result (make minimal results in some error messages for me, but I suspect the diffferences between our examples may be to blame).
Difference between our examples (I think): in your example, it looks like you're scrollbinding with the 1 buffer in 2 vsplit windows. In my example, I'm scrolling with 2 buffers in 2 vsplit windows.
The errors, which I think indicate some issue with treesitter loading:
Errors (treesitter related)
Error detected while processing ~/.config/nvim/pack/packager/start/nvim-colorizer.lua/test/minimal-colorizer.lua:
E5113: Error while calling lua chunk: ...ager/start/nvim-colorizer.lua/test/minimal-colorizer.lua:102: ~/.config/nvim/pack/packager/start/nvim-colorizer.lua/test/minimal-colorizer.lua..BufReadPost Auto
commands for "*": Vim(append):Error executing lua callback: /usr/share/nvim/runtime/filetype.lua:36: ~/.config/nvim/pack/packager/start/nvim-colorizer.lua/test/minimal-colorizer.lua..BufReadPost Autoco
mmands for "*"..FileType Autocommands for "*"..function <SNR>1_LoadFTPlugin[20]..script /usr/share/nvim/runtime/ftplugin/lua.lua: Vim(runtime):E5113: Error while calling lua chunk: /usr/share/nvim/runtime/lua/vim
/treesitter.lua:427: Parser could not be created for buffer 1 and language "lua"
stack traceback:
[C]: in function 'assert'
/usr/share/nvim/runtime/lua/vim/treesitter.lua:427: in function 'start'
/usr/share/nvim/runtime/ftplugin/lua.lua:2: in main chunk
[C]: in function 'nvim_cmd'
/usr/share/nvim/runtime/filetype.lua:36: in function </usr/share/nvim/runtime/filetype.lua:35>
[C]: in function 'pcall'
vim/shared.lua: in function <vim/shared.lua:0>
[C]: in function '_with'
/usr/share/nvim/runtime/filetype.lua:35: in function </usr/share/nvim/runtime/filetype.lua:10>
[C]: in function 'edit'
...ager/start/nvim-colorizer.lua/test/minimal-colorizer.lua:102: in main chunk
stack traceback:
[C]: in function '_with'
/usr/share/nvim/runtime/filetype.lua:35: in function </usr/share/nvim/runtime/filetype.lua:10>
[C]: in function 'edit'
...ager/start/nvim-colorizer.lua/test/minimal-colorizer.lua:102: in main chunk
stack traceback:
[C]: in function 'edit'
...ager/start/nvim-colorizer.lua/test/minimal-colorizer.lua:102: in main chunk
What Neovim version are you using?
On Sun, Mar 2, 2025 at 7:37 AM Samuel Roeca @.***> wrote:
I tried it with the same result (make minimal results in some error messages for me, but I suspect the diffferences between our examples may be to blame).
Difference between our examples (I think): in your example, it looks like you're scrollbinding with the 1 buffer in 2 vsplit windows. In my example, I'm scrolling with 2 buffers in 2 vsplit windows.
The errors, which I think indicate some issue with treesitter loading: Errors (treesitter related)
Error detected while processing ~/.config/nvim/pack/packager/start/nvim-colorizer.lua/test/minimal-colorizer.lua: E5113: Error while calling lua chunk: ...ager/start/nvim-colorizer.lua/test/minimal-colorizer.lua:102: ~/.config/nvim/pack/packager/start/nvim-colorizer.lua/test/minimal-colorizer.lua..BufReadPost Auto commands for "": Vim(append):Error executing lua callback: /usr/share/nvim/runtime/filetype.lua:36: ~/.config/nvim/pack/packager/start/nvim-colorizer.lua/test/minimal-colorizer.lua..BufReadPost Autoco mmands for ""..FileType Autocommands for "*"..function <SNR>1_LoadFTPlugin[20]..script /usr/share/nvim/runtime/ftplugin/lua.lua: Vim(runtime):E5113: Error while calling lua chunk: /usr/share/nvim/runtime/lua/vim /treesitter.lua:427: Parser could not be created for buffer 1 and language "lua" stack traceback: [C]: in function 'assert' /usr/share/nvim/runtime/lua/vim/treesitter.lua:427: in function 'start' /usr/share/nvim/runtime/ftplugin/lua.lua:2: in main chunk [C]: in function 'nvim_cmd' /usr/share/nvim/runtime/filetype.lua:36: in function </usr/share/nvim/runtime/filetype.lua:35> [C]: in function 'pcall' vim/shared.lua: in function <vim/shared.lua:0> [C]: in function '_with' /usr/share/nvim/runtime/filetype.lua:35: in function </usr/share/nvim/runtime/filetype.lua:10> [C]: in function 'edit' ...ager/start/nvim-colorizer.lua/test/minimal-colorizer.lua:102: in main chunk stack traceback: [C]: in function '_with' /usr/share/nvim/runtime/filetype.lua:35: in function </usr/share/nvim/runtime/filetype.lua:10> [C]: in function 'edit' ...ager/start/nvim-colorizer.lua/test/minimal-colorizer.lua:102: in main chunk stack traceback: [C]: in function 'edit' ...ager/start/nvim-colorizer.lua/test/minimal-colorizer.lua:102: in main chunk
— Reply to this email directly, view it on GitHub https://github.com/catgoose/nvim-colorizer.lua/issues/147#issuecomment-2692737703, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFAJNGEU75QHXA5AOWINJH32SMCPZAVCNFSM6AAAAABYCPQDMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOJSG4ZTONZQGM . You are receiving this because you were mentioned.Message ID: @.***> [image: pappasam]pappasam left a comment (catgoose/nvim-colorizer.lua#147) https://github.com/catgoose/nvim-colorizer.lua/issues/147#issuecomment-2692737703
I tried it with the same result (make minimal results in some error messages for me, but I suspect the diffferences between our examples may be to blame).
Difference between our examples (I think): in your example, it looks like you're scrollbinding with the 1 buffer in 2 vsplit windows. In my example, I'm scrolling with 2 buffers in 2 vsplit windows.
The errors, which I think indicate some issue with treesitter loading: Errors (treesitter related)
Error detected while processing ~/.config/nvim/pack/packager/start/nvim-colorizer.lua/test/minimal-colorizer.lua: E5113: Error while calling lua chunk: ...ager/start/nvim-colorizer.lua/test/minimal-colorizer.lua:102: ~/.config/nvim/pack/packager/start/nvim-colorizer.lua/test/minimal-colorizer.lua..BufReadPost Auto commands for "": Vim(append):Error executing lua callback: /usr/share/nvim/runtime/filetype.lua:36: ~/.config/nvim/pack/packager/start/nvim-colorizer.lua/test/minimal-colorizer.lua..BufReadPost Autoco mmands for ""..FileType Autocommands for "*"..function <SNR>1_LoadFTPlugin[20]..script /usr/share/nvim/runtime/ftplugin/lua.lua: Vim(runtime):E5113: Error while calling lua chunk: /usr/share/nvim/runtime/lua/vim /treesitter.lua:427: Parser could not be created for buffer 1 and language "lua" stack traceback: [C]: in function 'assert' /usr/share/nvim/runtime/lua/vim/treesitter.lua:427: in function 'start' /usr/share/nvim/runtime/ftplugin/lua.lua:2: in main chunk [C]: in function 'nvim_cmd' /usr/share/nvim/runtime/filetype.lua:36: in function </usr/share/nvim/runtime/filetype.lua:35> [C]: in function 'pcall' vim/shared.lua: in function <vim/shared.lua:0> [C]: in function '_with' /usr/share/nvim/runtime/filetype.lua:35: in function </usr/share/nvim/runtime/filetype.lua:10> [C]: in function 'edit' ...ager/start/nvim-colorizer.lua/test/minimal-colorizer.lua:102: in main chunk stack traceback: [C]: in function '_with' /usr/share/nvim/runtime/filetype.lua:35: in function </usr/share/nvim/runtime/filetype.lua:10> [C]: in function 'edit' ...ager/start/nvim-colorizer.lua/test/minimal-colorizer.lua:102: in main chunk stack traceback: [C]: in function 'edit' ...ager/start/nvim-colorizer.lua/test/minimal-colorizer.lua:102: in main chunk
— Reply to this email directly, view it on GitHub https://github.com/catgoose/nvim-colorizer.lua/issues/147#issuecomment-2692737703, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFAJNGEU75QHXA5AOWINJH32SMCPZAVCNFSM6AAAAABYCPQDMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOJSG4ZTONZQGM . You are receiving this because you were mentioned.Message ID: @.***>
I'm using the latest version nightly deliverable through apt on Ubuntu 24.04.
NVIM v0.11.0-dev
Build type: RelWithDebInfo
LuaJIT 2.1.1703358377
Compilation: /usr/bin/cc -g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=/build/neovim-LmrkYZ/neovim-0.10.0~ubuntu1+git202503020304-188ec19894-971e32c878=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -f
cf-protection -fdebug-prefix-map=/build/neovim-LmrkYZ/neovim-0.10.0~ubuntu1+git202503020304-188ec19894-971e32c878=/usr/src/neovim-0.10.0~ubuntu1+git202503020304-188ec19894-971e32c878-245dd88c76~ubuntu24.04.1 -O2 -g -flto=auto -fno-fat-lto-objects -Wall -Wextra -pedantic -Wno-unused-parameter -Wstric
t-prototypes -std=gnu99 -Wshadow -Wconversion -Wvla -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -fsigned-char -fstack-protector-strong -Wno-conversion -fno-common -Wno-unused-result -Wimplicit-fallthrough -fdiagnostics-color=auto -DUNIT_TESTING -D_GNU_SOURC
E -DINCLUDE_GENERATED_DECLARATIONS -DUTF8PROC_STATIC -I/usr/include/luajit-2.1 -I/build/neovim-LmrkYZ/neovim-0.10.0~ubuntu1+git202503020304-188ec19894-971e32c878/.deps/usr/include -I/build/neovim-LmrkYZ/neovim-0.10.0~ubuntu1+git202503020304-188ec19894-971e32c878/build/src/nvim/auto -I/build/neovim-L
mrkYZ/neovim-0.10.0~ubuntu1+git202503020304-188ec19894-971e32c878/build/include -I/build/neovim-LmrkYZ/neovim-0.10.0~ubuntu1+git202503020304-188ec19894-971e32c878/build/cmake.config -I/build/neovim-LmrkYZ/neovim-0.10.0~ubuntu1+git202503020304-188ec19894-971e32c878/src -I/usr/include
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"
Run :checkhealth for more info
Thanks I’ll see if I can recreate.
On Sun, Mar 2, 2025 at 8:21 AM Samuel Roeca @.***> wrote:
I'm using the latest nightly, as-delivered through apt on Ubuntu 24.04.
NVIM v0.11.0-dev Build type: RelWithDebInfo LuaJIT 2.1.1703358377 Compilation: /usr/bin/cc -g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=/build/neovim-LmrkYZ/neovim-0.10.0~ubuntu1+git202503020304-188ec19894-971e32c878=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -f cf-protection -fdebug-prefix-map=/build/neovim-LmrkYZ/neovim-0.10.0~ubuntu1+git202503020304-188ec19894-971e32c878=/usr/src/neovim-0.10.0~ubuntu1+git202503020304-188ec19894-971e32c878-245dd88c76~ubuntu24.04.1 -O2 -g -flto=auto -fno-fat-lto-objects -Wall -Wextra -pedantic -Wno-unused-parameter -Wstric t-prototypes -std=gnu99 -Wshadow -Wconversion -Wvla -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -fsigned-char -fstack-protector-strong -Wno-conversion -fno-common -Wno-unused-result -Wimplicit-fallthrough -fdiagnostics-color=auto -DUNIT_TESTING -D_GNU_SOURC E -DINCLUDE_GENERATED_DECLARATIONS -DUTF8PROC_STATIC -I/usr/include/luajit-2.1 -I/build/neovim-LmrkYZ/neovim-0.10.0~ubuntu1+git202503020304-188ec19894-971e32c878/.deps/usr/include -I/build/neovim-LmrkYZ/neovim-0.10.0~ubuntu1+git202503020304-188ec19894-971e32c878/build/src/nvim/auto -I/build/neovim-L mrkYZ/neovim-0.10.0~ubuntu1+git202503020304-188ec19894-971e32c878/build/include -I/build/neovim-LmrkYZ/neovim-0.10.0~ubuntu1+git202503020304-188ec19894-971e32c878/build/cmake.config -I/build/neovim-LmrkYZ/neovim-0.10.0~ubuntu1+git202503020304-188ec19894-971e32c878/src -I/usr/include
system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/usr/share/nvim"
Run :checkhealth for more info
— Reply to this email directly, view it on GitHub https://github.com/catgoose/nvim-colorizer.lua/issues/147#issuecomment-2692755238, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFAJNGH2GYC4VMR3DLC6YPT2SMHVZAVCNFSM6AAAAABYCPQDMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOJSG42TKMRTHA . You are receiving this because you were mentioned.Message ID: @.***> [image: pappasam]pappasam left a comment (catgoose/nvim-colorizer.lua#147) https://github.com/catgoose/nvim-colorizer.lua/issues/147#issuecomment-2692755238
I'm using the latest nightly, as-delivered through apt on Ubuntu 24.04.
NVIM v0.11.0-dev Build type: RelWithDebInfo LuaJIT 2.1.1703358377 Compilation: /usr/bin/cc -g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=/build/neovim-LmrkYZ/neovim-0.10.0~ubuntu1+git202503020304-188ec19894-971e32c878=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -f cf-protection -fdebug-prefix-map=/build/neovim-LmrkYZ/neovim-0.10.0~ubuntu1+git202503020304-188ec19894-971e32c878=/usr/src/neovim-0.10.0~ubuntu1+git202503020304-188ec19894-971e32c878-245dd88c76~ubuntu24.04.1 -O2 -g -flto=auto -fno-fat-lto-objects -Wall -Wextra -pedantic -Wno-unused-parameter -Wstric t-prototypes -std=gnu99 -Wshadow -Wconversion -Wvla -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -fsigned-char -fstack-protector-strong -Wno-conversion -fno-common -Wno-unused-result -Wimplicit-fallthrough -fdiagnostics-color=auto -DUNIT_TESTING -D_GNU_SOURC E -DINCLUDE_GENERATED_DECLARATIONS -DUTF8PROC_STATIC -I/usr/include/luajit-2.1 -I/build/neovim-LmrkYZ/neovim-0.10.0~ubuntu1+git202503020304-188ec19894-971e32c878/.deps/usr/include -I/build/neovim-LmrkYZ/neovim-0.10.0~ubuntu1+git202503020304-188ec19894-971e32c878/build/src/nvim/auto -I/build/neovim-L mrkYZ/neovim-0.10.0~ubuntu1+git202503020304-188ec19894-971e32c878/build/include -I/build/neovim-LmrkYZ/neovim-0.10.0~ubuntu1+git202503020304-188ec19894-971e32c878/build/cmake.config -I/build/neovim-LmrkYZ/neovim-0.10.0~ubuntu1+git202503020304-188ec19894-971e32c878/src -I/usr/include
system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/usr/share/nvim"
Run :checkhealth for more info
— Reply to this email directly, view it on GitHub https://github.com/catgoose/nvim-colorizer.lua/issues/147#issuecomment-2692755238, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFAJNGH2GYC4VMR3DLC6YPT2SMHVZAVCNFSM6AAAAABYCPQDMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOJSG42TKMRTHA . You are receiving this because you were mentioned.Message ID: @.***>
I tried it with the same result (
make minimalresults in some error messages for me, but I suspect the diffferences between our examples may be to blame).Difference between our examples (I think): in your example, it looks like you're scrollbinding with the 1 buffer in 2 vsplit windows. In my example, I'm scrolling with 2 buffers in 2 vsplit windows.
The errors, which I think indicate some issue with treesitter loading:
Errors (treesitter related)
In this case I am opening minimal-colorizer.lua as well as expect.lua and it renders both.
I'll pull down https://github.com/pappasam/papercolor-theme-slim and try there.
Btw, what are you using to record your screen captures? Mine seem to be leaving out a lot.
Thanks.
@catgoose peek:
$ apt show peek
Package: peek
Version: 1.5.1+git20230114-1build2
Priority: optional
Section: universe/graphics
Origin: Ubuntu
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Debian QA Group <[email protected]>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 984 kB
Depends: ffmpeg, gstreamer1.0-plugins-good, dconf-gsettings-backend | gsettings-backend, libc6 (>= 2.34), libcairo2 (>= 1.10.0), libglib2.0-0t64 (>= 2.79.0), libgtk-3-0t64 (>= 3.21.5), libkeybinder-3.0-0 (>= 0.3.0), libpango-1.0-0 (>= 1.14.0)
Recommends: gstreamer1.0-plugins-ugly
Suggests: gifski
Homepage: https://github.com/phw/peek
Download-Size: 195 kB
APT-Manual-Installed: yes
APT-Sources: http://us.archive.ubuntu.com/ubuntu noble/universe amd64 Packages
Description: Simple animated GIF screen recorder with GUI
Peek is a simple screen recorder. It is optimized for generating
animated GIFs but you can also directly record to WebM or MP4
if you prefer.
Note: I suspect the general impact concerns text that's far from the currently-visible section in a non-active scrollbound window (containing a different buffer... very specific, I know...).
Notice how in my example, the color codes at the top of the file are highlighted, but when I scroll down, text in the non-active window doesn't get highlighted.