-
Notifications
You must be signed in to change notification settings - Fork 1
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
Incompatibility with lewis6991/fileline.nvim #5
Comments
Both the fileline and vim-fetch plugins seem to close the first buffer and re-open a new one when triggered, which is probably why this error is logged.
vs:
|
Thanks for reporting! Just for my reference, need to actually open a file which is in the yadm repo for the error, so like a:
I think the error gets thrown in gitsigns code, not here, so probably cant catch that. perhaps the argument can be checked to see if theres a line number included, I'm not sure what the API for that is like... seems quite hacky, but can take a look when I have some free time |
fwiw I am seeing the same error from gitsigns after making a Git commit using Neogit. I don't have the fileline.nvim plugin. |
Just to confirm, are you using a line number when opening the file like |
I always open files regularly, make some changes, and commit them using Neogit. It's only after the commit message is saved and the window closes that I see the error. It goes away when I disable gitsigns-yadm. fwiw I've never used the fileline plugin |
Just to update the status here a bit, I am a bit unsure how to proceed here; this plugin is a bunch of configuration around one specific callback command which is the entire surface area of the gitsigns API this interacts with, it is not complicated at all. Those two fields are then processed here in gitsigns. I would have to read through/really understand gitsigns a lot more than I do currently to able to debug why this is failing, and thats not something I have a ton of time for right now. If someone can point me in the right direction/would like to take this on and submit a PR, would be appreciated. |
I've temporarily fixed the issue for me by disabling this plugin for other projects (inside Git repos). _on_attach_pre = function(bufnr, callback)
if vim.uv.fs_stat '.git' then
-- disable YADM if inside Git repo
return callback()
end
require('gitsigns-yadm').yadm_signs(callback)
end |
Hi,
If anyone happens to use both this here plugin and lewis6991/fileline.nvim (or wsdjeg/vim-fetch) and then opens a git-tracked file like this:
nvim FILE:1
an error is thrown:Sample config to reproduce:
and then:
nvim -u FILE_FROM_ABOVE.lua MYFILE:LINE_NUMBER
(eg:nvim -u init-repro.lua README.md:1
)The text was updated successfully, but these errors were encountered: