nvim-lua / plenary.nvim

plenary: full; complete; entire; absolute; unqualified. All the lua functions I don't want to write twice.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature Request] Propagate OS Errors on Make Directory and more.

cjhillbrand opened this issue · comments

Hello, I am currently using the plenary plugin via the obsidian.nvim plug in, and is a very cool plug in. If I ever get to the point where I am writing my own plugin, I will definitely be using this library to aid in my development.

The request here is to propagate a bit more information when issuing requests to the OS. For example the specific example is invoking the mkdir function. The resulting error message is:

We couldn't mkdir: ...

It would help me during the debugging process to have more specific details associated with the failure. For example:

  1. Does the path not exist?
  2. Did the OS reject the path because it is not formatted correctly?
  3. Did the application not have the required permissions to create the directory?
  4. etc.

I would imagine this would have to be handled in an OS-specific manner, but would definitely be a huge value add to any error message!!

Thanks for the great library and I hope you consider the request!