google / google/vim-maktaba

Remove env_dict param from Syscall.CallAsync callbacks

Open
#180 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Vim Script
Stars
588
Forks
41
PR merge metrics
No merged PRs in 30d

Description

`Syscall.CallAsync` expects a callback with signature `callback({env_dict}, {result_dict})`, where env_dict contains cursor and vim state info. In practice, it's not easy to remember the argument order, and it's easy enough and more explicit/flexible for the caller to just capture the env info they need and bind it to the callback with `maktaba#function#Create`.

We should migrate `Syscall.CallAsync` to expect a signature `callback({result_dict})` instead and just document how callers can capture and pass info along.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.