ohne-accidents.nvim
ohne-accidents.nvim copied to clipboard
Option to use `vim.notify()` API instead of echo
Thank you for this plugin! I use and like it, but I would be great to have an setup option display the message(s) via vim.notify() (:h vim.notify) instead of echo. I have some things that happen on startup and the echo message get hidden very quickly.
I wanted to try to contribute myself, by adding a method = "echo" | "notify" setup config option, but I was stopped, since there was no .editorconfig or stylua.toml in the root of your project so my Formater ran with the default options and reformats the whole file when I try to edit the file. I could also disable the auto format, but this is also not a good option I think.
Also I have no experience with testing Lua files. 😁
Thank you again.
I just added an .editorconfig to the project. Let me know if you need anything else to make your suggestion happen.
Hey thank you for your reply. :)
With the .editorconfig in place i will create an PR with an attempt to realize this. I will ping you for the tests if i need help.
Super!
@nikbrunner Sorry I missed your MR! It is merged now. Thanks for running the editorconfig. :)
Thank you for merging #5. :) I setup an PR to bring these features into this project: #6
@nikbrunner I merged your branch into a separate branch, (sorry, I didn't know how to test your MR/branch locally because it was from a fork) here: chore/add-option-to-use-notify-api-instead-of-echo
But I was unable to get things running locally, and the tests are failing. I can have a look this weekend and try to fix things.
Anyways, overall it looks good. Sorry Ive been so slow on this. For some reason github is not notifying me when you write a comment or make an MR.
No problem. :) Did I do something wrong while submitting the Pull Request? Thank you for the merge. I have updated my configuration to use the mentioned branch and will test things that way.
---@type LazyPluginSpec
M.spec = {
"blumaa/ohne-accidents.nvim",
branch = "chore/add-option-to-use-notify-api-instead-of-echo",
event = "UIEnter",
keys = {
{
"<leader>vc",
":OhneAccidents<CR>",
desc = "Time since last config change",
},
},
---@type OhneAccidentsConfig
opts = {
api = "notify",
multiLine = false,
useLastCommit = true,
},
}
No I think your MR was okay! I think it's my lack of dev experience. I couldn't figure out how to switch branches to your forked branch to test it.
EDIT: Okay what the heck. I must be tired today. :) I just switched to your branch now. I think the problem is I was using your name as a prefix. It works!
hold on a sec and let me test a thing and then I think we're good to go.
I also didn't know you could just add the branch to the lazy config like that. Makes it a lot easier than trying to config the directories locally.
I got the tests working. You can run them with busted.
@nikbrunner Merged, published, released. 🎉
Nice work man! And thanks for teaching me things.
Merged, published, released.
Very nice 😊 🤝