diff options
| author | William Boman <william@redwill.se> | 2023-04-03 00:33:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-02 22:33:48 +0000 |
| commit | 0114336145771ff7c528debba52c5ff21bf6f7a2 (patch) | |
| tree | 37802cb27b602c9c3e900aec7f3ad012ed3b8719 /lua/mason-core/installer/registry/init.lua | |
| parent | chore: consolidate generate task (#1171) (diff) | |
| download | mason-0114336145771ff7c528debba52c5ff21bf6f7a2.tar mason-0114336145771ff7c528debba52c5ff21bf6f7a2.tar.gz mason-0114336145771ff7c528debba52c5ff21bf6f7a2.tar.bz2 mason-0114336145771ff7c528debba52c5ff21bf6f7a2.tar.lz mason-0114336145771ff7c528debba52c5ff21bf6f7a2.tar.xz mason-0114336145771ff7c528debba52c5ff21bf6f7a2.tar.zst mason-0114336145771ff7c528debba52c5ff21bf6f7a2.zip | |
refactor: only schedule in a.scheduler() when in fast event (#1170)
Explicitly schedule via `a.wait(vim.schedule)` instead.
Diffstat (limited to 'lua/mason-core/installer/registry/init.lua')
| -rw-r--r-- | lua/mason-core/installer/registry/init.lua | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lua/mason-core/installer/registry/init.lua b/lua/mason-core/installer/registry/init.lua index f03f3e31..23b1a379 100644 --- a/lua/mason-core/installer/registry/init.lua +++ b/lua/mason-core/installer/registry/init.lua @@ -141,10 +141,8 @@ end function M.compile(spec, opts) log.debug("Compiling installer.", spec.name, opts) return Result.try(function(try) - if vim.in_fast_event() then - -- Parsers run synchronously and may access API functions, so we schedule before-hand. - a.scheduler() - end + -- Parsers run synchronously and may access API functions, so we schedule before-hand. + a.scheduler() local map_parse_err = _.cond { { |
