WIP/RFC: `dynamic_command` is now async, and runs immediately when opening buffers
This implements https://github.com/nvimtools/none-ls.nvim/issues/193.
This is incomplete, which is why I've marked it as draft. It's also stacked on top of https://github.com/nvimtools/none-ls.nvim/pull/192, and includes the commits from that PR. Just ignore the first 2 commits in this PR and focus on the last one ("WIP/RFC: dynamic_command is now async, and runs immediately when opening buffers").
I've redefined dynamic_command to be an async
function, but I haven't actually updated all the builtins accordingly. I
have updated nix_flake_fmt to demonstrate the idea.
If folks like the direction I'm going with this, I'll polish up
the PR so all dynamic_commands are async, and I'll get the tests
passing.
@lassulus, FYI with this change I think slow nix flake eval time is basically unnoticeable =)
please fix the failing ci checks, thanks!
@mochaaP, I've rebased this, it's now ready for review. A couple changes:
- I've removed the dependency on https://github.com/nvimtools/none-ls.nvim/pull/192. This just makes
dynamic_commandasync, and adds a corresponding cache helper for async functions. - I've removed the logic to start computing the
dynamic_commandthe moment we open a buffer. That got a little tricky, so I plan to do it in a followup PR.
Thanks, @mochaaP! I'll rebase https://github.com/nvimtools/none-ls.nvim/pull/192 on top of this now.