generated from antfu/starter-vscode
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
49 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"locale": "zh-CN", | ||
"emeraldwalk.runonsave": { | ||
"commands": [ | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"publisher": "oeyoews", | ||
"name": "usewiki2", | ||
"displayName": "usewiki2", | ||
"version": "2.6.2", | ||
"version": "2.6.3", | ||
"private": true, | ||
"packageManager": "[email protected]", | ||
"description": "", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import * as vscode from 'vscode'; | ||
import { commands } from 'vscode'; | ||
|
||
export async function cli() { | ||
const searchQuery = '@ext:oeyoews.usewiki2'; | ||
vscode.commands.executeCommand('workbench.action.openSettings', searchQuery); | ||
commands.executeCommand('workbench.action.openSettings', searchQuery); | ||
} | ||
|
||
export const name = 'usewiki2.opensettings'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import * as vscode from 'vscode'; | ||
import { env, Uri } from 'vscode'; | ||
import { getIp, getPort, enableHttps } from '../config'; | ||
|
||
export function cli() { | ||
const protocal = enableHttps() ? 'https' : 'http'; | ||
const url = `${protocal}://${getIp()}:${getPort()}`; | ||
|
||
vscode.env.openExternal(vscode.Uri.parse(url)); | ||
env.openExternal(Uri.parse(url)); | ||
} | ||
|
||
export const name = 'usewiki2.openwiki'; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,24 @@ | ||
import * as vscode from 'vscode'; | ||
import { l10n } from 'vscode'; | ||
import { usewikiViewProvider } from './webviews'; | ||
|
||
import * as openWiki from './commands/openWikiCmd'; | ||
import * as wikiInfo from './commands/wikiInfo'; | ||
import * as opensetting from './commands/openSettings'; | ||
import { type ExtensionContext, window, commands } from 'vscode'; | ||
|
||
// import * as usewikiCmd from './commands/usewikiCmd'; | ||
// import * as refreshWiki from './commands/refreshWiki'; | ||
|
||
export async function activate(context: vscode.ExtensionContext) { | ||
export async function activate(context: ExtensionContext) { | ||
const provider = new usewikiViewProvider(context); | ||
context.subscriptions.push( | ||
vscode.window.registerWebviewViewProvider('usewiki2', provider) | ||
window.registerWebviewViewProvider('usewiki2', provider) | ||
); | ||
|
||
const cmds = [opensetting, wikiInfo, openWiki]; | ||
|
||
// 注册命令 | ||
cmds.forEach((cmd: { name: string; cli: any }) => { | ||
const disposable = vscode.commands.registerCommand(cmd.name, cmd.cli); | ||
const disposable = commands.registerCommand(cmd.name, cmd.cli); | ||
context.subscriptions.push(disposable); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters