Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add :commands hot reload command editor #100

Closed
daretodave opened this issue May 7, 2024 · 0 comments · Fixed by #102
Closed

add :commands hot reload command editor #100

daretodave opened this issue May 7, 2024 · 0 comments · Fixed by #102
Labels
back-end backend work good first issue Good for newcomers ready

Comments

@daretodave
Copy link
Contributor

same format as :settings see approach

await context.edit(context.workspace.settings.location, async () => {
context.out('Saved settings! Reloading..\n')
await context.workspace.settings.load()
await context.workspace.applySettings(RunnerWindow)
context.out('Settings reloaded\n')
})

the callback should run await context.workspace.commands.load

  • see :reload for reload techniques
  • async function reload(context: ExecuteContext): Promise<void> {
    await context.workspace.load()
    context.out('- settings reloaded \n')
    await context.workspace.commands.load(context.workspace.settings)
    context.out('- commands reloaded \n')
    await context.workspace.reload(RunnerWindow)
    context.out('- window reloaded \n')
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
back-end backend work good first issue Good for newcomers ready
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant