lucc / nvimpager

Use nvim as a pager to view manpages, diffs, etc with nvim's syntax highlighting
Other
395 stars 21 forks source link

Missing `nvim_create_augroup` #72

Closed nocibambi closed 2 years ago

nocibambi commented 2 years ago

Environment: freshly installed nvimpager v0.11 on Ubuntu 22.04

# .bashrc
export VISUAL=nvim
export EDITOR="$VISUAL"
export PAGER=nvimpager
export MANPAGER=nvimpager

When executing $ man find, produces an error containing the following :

Error detected while processing pre-vimrc command line:
E5108: Error executing lua .../username/.local/share/nvimpager/runtime/lua/nvimpager.lua:734: attempt to call field 'nvim_create_augroup' (a nil value)

The error disappears after a second and the manpage works without visible problems.

lucc commented 2 years ago

There is no version 0.11 of nvimpager. There is v0.10.4 and the current main branch.

How did you install? There is no nvimpager package in the ubuntu repos.

On Ubuntu 22.04 you only have neovim 0.6.1 in the repos. Which version of neovim are you using? The current development version of nvimpager needs nvim >=0.7.2. But that is noted in the readme file.

nocibambi commented 2 years ago

I updated nvim to 0.7.2. The error message disappeared.

Not really my concern, but nvimpager version is still v0.11:

~$ nvimpager -v
nvimpager v0.11

I installed it by cloning the repo and make PREFIX=$HOME/.local install.

I did a few clean, uninstall, reinstall, .PHONY iterations because of path issues and having no scdoc installed.

lucc commented 2 years ago

Which git commit are you using? Did you by chance execute make version at some point? That would change the version number. Is your git state clean (git status)? What is the version of nvimpager when you execute it from the git repo (./nvimpager -v)?

nocibambi commented 2 years ago

Yes, I ran make version.

The version in the repo from where I installed it is v0.11. Strangely, when I clone the repo again, the version is 0.11.0-4-g59fe073.

Here is the diff of the used repo:

diff --git a/makefile b/makefile
index b7c7b00..788abb8 100644
--- a/makefile
+++ b/makefile
@@ -21,7 +21,7 @@ uninstall:
      $(PREFIX)/share/man/man1/nvimpager.1 \
      $(PREFIX)/share/zsh/site-functions/_nvimpager

-nvimpager.1: SOURCE_DATE_EPOCH = $(shell git log -1 --no-show-signature --pretty="%ct" 2>/dev/null || echo 1636921311)
+nvimpager.1: SOURCE_DATE_EPOCH = $(shell git log -1 --no-show-signature --pretty="%ct" 2>/dev/null || echo 1665645451)
 nvimpager.1: nvimpager.md
    sed '1s/$$/ "nvimpager $(VERSION)"/' $< | scdoc > $@

diff --git a/nvimpager b/nvimpager
index 6d9ed1c..e1e83fe 100755
--- a/nvimpager
+++ b/nvimpager
@@ -51,7 +51,7 @@ while getopts achpv flag; do
     h) usage; description; exit;;
     p) mode=pager;;
     v)
-      version=$(git -C "$RUNTIME" describe 2>/dev/null) || version=v0.10.4
+      version=v0.11
       echo "$name $version"
       exit
       ;;
lucc commented 2 years ago

I have since released an official 0.11. The make target version is for me to prepare a new release and is not intended to be used by others.

nocibambi commented 2 years ago

Yes, I probably ran it with .PHONY

On Sun, 16 Oct 2022 at 22:07, Lucas Hoffmann @.***> wrote:

I have since released an official 0.11. The make target version is for me to prepare a new release and is not intended to be used by others.

— Reply to this email directly, view it on GitHub https://github.com/lucc/nvimpager/issues/72#issuecomment-1280046387, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBE4GV5TVEPZVCTPLVX5VLWDROA3ANCNFSM6AAAAAARD7R2VU . You are receiving this because you modified the open/close state.Message ID: @.***>

-- András