chentoast/marks.nvim

Error executing BufEnter Autocommands

euglevi opened this issue · 3 comments

First of all, thank you for the amazing plugin. It is a nice improvement over vim-signature.

From today, I noticed that if I have the builtin_marks option in my configuration I get the following error at the very start of Neovim:

Errore/i eseguendo BufEnter Autocommands for "*":                                                                                                                                                               
E5108: Error executing lua Vim:E474: Argomento non valido 

This is even if I use the configuration from the README example. I am sorry I do not know enough lua to debug this more.

EDIT: to be more precise, this seems to happen only with the marks "<" and ">". If I remove those ones, everything works fine again.

I made a really quick fix on this :

local function setup_autocommands()
	vim.cmd([[augroup Marks_autocmds
    autocmd!
    autocmd BufRead, BufEnter * lua require("marks").refresh()
    autocmd BufRead, BufDelete * lua require("marks")._on_delete()
  augroup end]])
end

By adding BufRead ontop of BufEnter .

in the /marks/init.lua, but wasnt sure if this was the "correct" way of doing it >.<

I just pushed a fix to master that should hopefully resolve this issue. Sorry for the inconvenience

No big deal. Thank you very much!