Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"typescript.tsc.autoDetect": "off",
"typescript.preferences.quoteStyle": "single",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
Expand Down
26 changes: 3 additions & 23 deletions client/src/extension.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as path from "path";
import {
workspace,
ExtensionContext,
window,
commands,
Expand All @@ -27,36 +26,17 @@ let client: LanguageClient;

//拡張機能を立ち上げたときに呼び出す関数
export function activate(context: ExtensionContext) {
// The server is implemented in node
const serverModule = context.asAbsolutePath(
path.join("server", "out", "server.js"),
);
// The debug options for the server
// --inspect=6009: runs the server in Node's Inspector mode so VS Code can attach to the server for debugging
const debugOptions = { execArgv: ["--nolazy", "--inspect=6009"] };

// If the extension is launched in debug mode then the debug server options are used
// Otherwise the run options are used
const serverOptions: ServerOptions = {
run: { module: serverModule, transport: TransportKind.ipc },
debug: {
module: serverModule,
transport: TransportKind.ipc,
options: debugOptions,
},
run: { module: serverModule, transport: TransportKind.stdio },
debug: { module: serverModule, transport: TransportKind.stdio },
};

// 対象とする言語。今回はplaintext
const clientOptions: LanguageClientOptions = {
// Register the server for plain text documents
documentSelector: [
{ pattern: "**", scheme: "file" },
{ pattern: "**", scheme: "untitled" },
],
synchronize: {
// Notify the server about file changes to '.clientrc files contained in the workspace
fileEvents: workspace.createFileSystemWatcher("**/.clientrc"),
},
documentSelector: [{ scheme: "file", language: "sql" }],
};

// Create the language client and start the client.
Expand Down
48 changes: 1 addition & 47 deletions server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@
},
"repository": {},
"dependencies": {
"uroborosql-fmt-napi": "file:uroborosql-fmt-napi-1.0.1.tgz",
"vscode-languageserver": "^9.0.0",
"vscode-languageserver-textdocument": "^1.0.4",
"vscode-uri": "^3.0.7"
"uroborosql-fmt-napi": "file:uroborosql-fmt-napi-1.0.1.tgz"
},
"scripts": {}
}
Loading
Loading