Work on supporting both epoch and fuel
This commit is contained in:
parent
10670dba70
commit
8974b0c490
3 changed files with 99 additions and 56 deletions
|
@ -9,7 +9,10 @@ use std::{any::Any, path::PathBuf, sync::Arc};
|
|||
use util::ResultExt;
|
||||
|
||||
pub async fn new_json(executor: Arc<Background>) -> Result<PluginLspAdapter> {
|
||||
let plugin = PluginBuilder::new_with_default_ctx(PluginYield::default_epoch())?
|
||||
let plugin =
|
||||
PluginBuilder::new_epoch_with_default_ctx(PluginYield::default_epoch(), |future| {
|
||||
executor.spawn(future).detach()
|
||||
})?
|
||||
.host_function_async("command", |command: String| async move {
|
||||
let mut args = command.split(' ');
|
||||
let command = args.next().unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue