-
Notifications
You must be signed in to change notification settings - Fork 20
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
cat
mode stopped colorising syntax
#101
Comments
Shiftwidth is a setting that only has an effect when editing, so it is not relevant for nvimpager (any mode). Tabstop is not yet supported in cat mode, this is tracked in #35. You can check if the config file is loaded in cat mode by just adding some debug statement to the config file: print("config loaded")
vim.cmd.quitall() Are you sure you want to append to rtp with the comma? I think it should be (the docs say it works like vim.opt.runtimepath:append("~/.local/share/nvim/lazy/github-nvim-theme") Can you minimize your config to the smallest version that produces the error? You can debug the bash part of nvimpager with |
This works for both cat and pager mode, thank you.
I did remove the comma, but that did not help. Here is the minimal config with chosen syntax colouring: vim.opt.runtimepath:append("~/.local/share/nvim/lazy/github-nvim-theme")
vim.cmd("colorscheme github_dark_dimmed") Still the same issue: ❯ bash -x nvimpager -p ~/.config/yazi/plugins/nvimpager.yazi/init.lua
+ RUNTIME=/opt/homebrew/Cellar/nvimpager/0.13.0/share/nvimpager/runtime
+ PARENT=782
+ TMPFILE=
+ export RUNTIME
+ export PARENT
+ export TMPFILE
+ export NVIM_APPNAME=nvimpager
+ NVIM_APPNAME=nvimpager
+ mode=auto
+ nvim=nvim
+ getopts achpv flag
+ case $flag in
+ mode=pager
+ getopts achpv flag
+ shift 1
+ [[ 1 -eq 0 ]]
+ [[ ! -t 1 ]]
+ files=()
+ [[ 1 -gt 0 ]]
+ [[ -f /Users/kaliberr44/.config/yazi/plugins/nvimpager.yazi/init.lua ]]
+ files+=("$1")
+ shift
+ [[ 0 -gt 0 ]]
+ [[ -z '' ]]
+ [[ 1 -eq 0 ]]
+ [[ -n '' ]]
+ args=(-R --cmd 'set rtp+=$RUNTIME | lua nvimpager = require("nvimpager"); nvimpager.stage1()' -c 'lua nvimpager.stage2()')
+ [[ pager = cat ]]
+ [[ pager = auto ]]
+ exec -a nvimpager nvim -R --cmd 'set rtp+=$RUNTIME | lua nvimpager = require("nvimpager"); nvimpager.stage1()' -c 'lua nvimpager.stage2()' /Users/kaliberr44/.config/yazi/plugins/nvimpager.yazi/init.lua ❯ bash -x nvimpager -c ~/.config/yazi/plugins/nvimpager.yazi/init.lua
+ RUNTIME=/opt/homebrew/Cellar/nvimpager/0.13.0/share/nvimpager/runtime
+ PARENT=782
+ TMPFILE=
+ export RUNTIME
+ export PARENT
+ export TMPFILE
+ export NVIM_APPNAME=nvimpager
+ NVIM_APPNAME=nvimpager
+ mode=auto
+ nvim=nvim
+ getopts achpv flag
+ case $flag in
+ mode=cat
+ getopts achpv flag
+ shift 1
+ [[ 1 -eq 0 ]]
+ [[ ! -t 1 ]]
+ files=()
+ [[ 1 -gt 0 ]]
+ [[ -f /Users/kaliberr44/.config/yazi/plugins/nvimpager.yazi/init.lua ]]
+ files+=("$1")
+ shift
+ [[ 0 -gt 0 ]]
+ [[ -z '' ]]
+ [[ 1 -eq 0 ]]
+ [[ -n '' ]]
+ args=(-R --cmd 'set rtp+=$RUNTIME | lua nvimpager = require("nvimpager"); nvimpager.stage1()' -c 'lua nvimpager.stage2()')
+ [[ cat = cat ]]
+ args+=(--headless)
+ exec -a nvimpager nvim -R --cmd 'set rtp+=$RUNTIME | lua nvimpager = require("nvimpager"); nvimpager.stage1()' -c 'lua nvimpager.stage2()' --headless /Users/kaliberr44/.config/yazi/plugins/nvimpager.yazi/init.lua |
This looks all good. You will have to debug what is actually going on inside nvimpager/neovim. Some ideas:
|
With no config at all - it is the same. No colouring in cat mode and in pager it is fine. |
I'm 99% sure that it did work like a month ago, without any config change. So maybe an update of |
I'm confused. Did you ever figure this out? I'm also trying to use nvimpager in cat mode for the previews with yazi, but I'm not having any luck. nvimpager doesn't show the correct syntax highlighting in any of the modes. Maybe I'm doing something wrong. |
I'm pretty sure it worked before, but right now
cat mode
is not colorising output (neithernvimpager "$1"
).nvimpager -p "$1"
works correctly with all the syntax colouring.❯ uname -a Darwin kaliberr44-mbp.private.net 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000 arm64 arm Darwin ❯ nvimpager -v nvimpager 0.13.0 ❯ nvim -v NVIM v0.10.0 Build type: Release LuaJIT 2.1.1716656478
nvimpager
config:Sample file for syntax color check:
The text was updated successfully, but these errors were encountered: