Open lucc opened 5 years ago
I'm in favor of this! Thanks for reporting the improvement :)
+1 for replacing all usages of systemlist()
.
That said, it might be worthwhile trying to understand why that command takes so long. (I was able to reproduce it taking several seconds by running it directly, but only the first time, which makes me suspect something is getting cached.)
I had a look at the code and it was not obvious/simple how to refactor it because the return value of the call is used later on. If the variable is set asynchronously it might be accessed before it was set.
Sometimes when I start neovim on a haskell file (
nvim Foo.hs
) I have a blank neovim screen sitting there for a while only showing the message"Foo.hs" 221 lines, 8209 characters
at the bottom. It can take several seconds until the file is displayed.Looking at running processes I see
stack path --config-location
which is called by intero withsystemlist()
. Now as the:help
indicatessystemlist()
is the old and blocking way to call external processes. And the newjob*()
api is already extensively used by this plugin. So I suggest to replace all remainingsystem*()
calls withjob*()
calls to make intero-neovim fully async.