mirror of
https://github.com/laosb/SvelteNova.git
synced 2025-08-20 15:02:40 +00:00
v0.1.3
This commit is contained in:
parent
31cbf07866
commit
694049180f
7 changed files with 12 additions and 23 deletions
19
src/main.ts
19
src/main.ts
|
@ -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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue