This commit is contained in:
Shibo Lyu 2020-11-01 07:15:42 +00:00
parent 31cbf07866
commit 694049180f
7 changed files with 12 additions and 23 deletions

View file

@ -2,24 +2,9 @@ import { dependencyManagement } from 'nova-extension-utils'
var langServer: SvelteLanguageServer | null = null
const wrapCommand = (command: (...params: any[]) => void) => {
return (...args: any[]) => {
try {
command(...args)
} catch (err) {
nova.workspace.showErrorMessage(err)
}
}
}
nova.commands.register(
'sb.lao.svelte-nova.commands.openWorkspaceConfig',
wrapCommand((workspace) => {
workspace.openConfig()
})
)
nova.commands.register('sb.lao.svelte-nova.commands.reload', () => {
nova.commands.register('sb.lao.svelte-nova.commands.reload', async () => {
deactivate()
activate()
await activate()
})
dependencyManagement.registerDependencyUnlockCommand(
'sb.lao.svelte-nova.commands.forceClearLock'