Closed elliottminns closed 1 year ago
Great work, thanks! Could you just fix the styling errors to pass checks?
As @MunifTanjin suggested, could you please just keep the api_key_cmd and use your asynchronous logic there?
Absolutely. I'll make that change today!
The setup option of
api_key_cmd
is great, but it's performed synchronously. As I use a password store backed by a Yubikey, this can cause a significant delay when opening up Neovim.In order to solve this, I've added a new setup option of
async_api_key_cmd
which uses plenary.job to asynchronously load the API key. For me, this improves the performance of opening up neovim and makes the plugin usable again.There are some caveats with this, however.
You can only specify a command that follows the following format:
Anything with piping, won't work. i.e.
Therefore, I opted to add a new setup configuration value, to ensure this does not break existing configurations. There may be a way to improve on this so that any command can be performed by the plenary job module.