Trying command gets nil value error
thepenguinthatwants opened this issue · 4 comments
Hi,
this plugin looks like its something that would be nice to include in neovim.
I've got an error from trying :MarksListAll
E5108: Error executing lua ...vim/site/pack/packer/start/marks.nvim/lua/marks/mark.lua:284: Invalid buffer id: 1
stack traceback:
[C]: in function 'nvim_buf_get_lines'
...vim/site/pack/packer/start/marks.nvim/lua/marks/mark.lua:284: in function 'all_to_list'
[string ":lua"]:1: in main chunk
Marks seems to be persistent and even if I delete them all, they show up when I open the file again.
Can you please post your plugin configuration, ie the table you pass to the setup function?
I had the same problem, I copied the settings table from the README:
require'marks'.setup {
-- whether to map keybinds or not. default true
default_mappings = true,
-- which builtin marks to show. default {}
builtin_marks = { ".", "<", ">", "^" },
-- whether movements cycle back to the beginning/end of buffer. default true
cyclic = true,
-- whether the shada file is updated after modifying uppercase marks. default false
force_write_shada = false,
-- how often (in ms) to redraw signs/recompute mark positions.
-- higher values will have better performance but may cause visual lag,
-- while lower values may cause performance penalties. default 150.
refresh_interval = 250,
-- sign priorities for each type of mark - builtin marks, uppercase marks, lowercase
-- marks, and bookmarks.
-- can be either a table with all/none of the keys, or a single number, in which case
-- the priority applies to all marks.
-- default 10.
sign_priority = { lower=10, upper=15, builtin=8, bookmark=20 },
-- disables mark tracking for specific filetypes. default {}
excluded_filetypes = {},
-- marks.nvim allows you to configure up to 10 bookmark groups, each with its own
-- sign/virttext. Bookmarks can be used to group together positions and quickly move
-- across multiple buffers. default sign is '!@#$%^&*()' (from 0 to 9), and
-- default virt_text is "".
bookmark_0 = {
sign = "⚑",
virt_text = "hello world"
},
mappings = {}
}
Setting builtin_marks to empty, ie. from:
{ ".", "<", ">", "^" }
to:
{}
fixed it for me.
Hm, I can't seem to reproduce. Can you please provide a minimal repro to produce the error?
I have the same issue with the default configuration.
This repros if any built-in marks (or probably any marks in general) was on a floating window that no longer exists before running this command.