Replies: 4 comments
-
Do you by any chance have The built-in notifications (or if if true nd using nvim-notify which I am) will display a toast that slides in in the corner and then disappears after a short while, without requiring user interaction. I agree that parsing git errors would be preferred. It would have to be done on a case by case basis with some common cases, and falling back on the complete message if a known pattern didn't match. There are frankly so many different ways git can fail, and I am not sure they are all documented or stable between versions. If they are, or if there is a way to get a structured git error please do let me know, but for now I would consider making a simple pattern matcher for common errors like the common pull before push error and alike, and then progressively expand from there as we encounter more errors. 😊 Does that sound like a good idea? |
Beta Was this translation helpful? Give feedback.
-
I think that sounds pretty reasonable - match some common ones, and display the rest in full. And always show the full error in the log. ...After upstreaming everything else? :P |
Beta Was this translation helpful? Give feedback.
-
I do have this. You're right that this reduces the number of required interactions. But I disabled them specifically because they take up too much space, and come in pairs. |
Beta Was this translation helpful? Give feedback.
-
This isn't really neogit related, but if you use something like function()
_G.old_print = print
local notify = require("notify")
vim.notify = notify
print = function(...)
local print_safe_args = {}
local _ = { ... }
for i = 1, #_ do
table.insert(print_safe_args, tostring(_[i]))
end
notify(table.concat(print_safe_args, ' '), "info")
end
end And then wherever you bind keys, set The first one will intercept nearly all Again, not related to neogit, but handy ;) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem? Please describe.
When a
git
error happens, I intuitively already know what's up most of the time. If I don't, I only need one short line to understand it. However, Neogit displays (1) the raw error fromgit
, and (2) yet another wrapped error from Neogit saying "git
failed":This also forces users to hit enter twice instead of maybe just once (or zero?).
Describe the solution you'd like
I'd like:
Beta Was this translation helpful? Give feedback.
All reactions