fileline.nvim
fileline.nvim copied to clipboard
Handling multiple files on the command line.
I'm looking to use fileline.nvim instead of my own version (https://github.com/dsully/nvim/blob/main/lua/config/autocommands.lua#L69) that was originally inspired by vim-fetch, but is somewhat fragile.
However, fileline.nvim doesn't support loading multiple files properly via the command line, eg:
nvim /path/to/file-a:10 file-b:41:5
I started looking into this again due to the new "ignore swap file" feature in nightly, which doesn't work with my implementation.
Thanks
Ping. (II saw you update a bunch of hover.nvim issues & PRs recently. Could use some ❤️ over here. :)
Will accept a PR.
I'm not sure the best/correct way to do this actually.. for example, if I run:
nvim lua/plugins/init.lua:5 filetype.lua:10
Then the following happens - output of :buffers:
And my bufferline.nvim is not ordered correctly (which is a side effect of the 2nd+ file not being loaded correctly:
Which I believe is the BufNewFile not being loaded for the Nth file. If I change the callback to emit a notification:
callback = function(event)
vim.notify("Loading: " .. event.file)
require("fileline").gotoline()
end
Only the first file is emitted. If I change to the next buffer, bufferline.nvim switches the "tabs" and a new notification event is emitted for the 2nd file.