Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
more prettier
  • Loading branch information
juleswritescode committed Oct 13, 2024
commit fedfd9ace07866dc18ca832b2e78a88e2276641a
11 changes: 6 additions & 5 deletions editors/code/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
module.exports = {
// use 100 because it's Rustfmt's default
// https://rust-lang.github.io/rustfmt/?version=v1.4.38&search=#max_width
printWidth: 100,
singleQuote: true,
tabWidth: 4,
// use 100 because it's Rustfmt's default
// https://rust-lang.github.io/rustfmt/?version=v1.4.38&search=#max_width
printWidth: 100,
singleQuote: true,
tabWidth: 4,
trailingComma: 'none'
};
17 changes: 12 additions & 5 deletions editors/code/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
Executable,
LanguageClient,
LanguageClientOptions,
ServerOptions,
ServerOptions
} from 'vscode-languageclient/node';

let client: LanguageClient;
Expand All @@ -13,21 +13,28 @@ export function activate(context: ExtensionContext) {
// If the extension is launched in debug mode then the debug server options are used
// Otherwise the run options are used
const run: Executable = {
command: 'pglsp',
command: 'pglsp'
};
const serverOptions: ServerOptions = {
run,
debug: run,
debug: run
};

// Options to control the language client
const clientOptions: LanguageClientOptions = {
// Register the server for plain text documents
documentSelector: [{ scheme: 'file', language: 'sql' }],
documentSelector: [
{ scheme: 'file', language: 'sql' }
]
};

// Create the language client and start the client.
client = new LanguageClient('postgres_lsp', 'Postgres LSP', serverOptions, clientOptions);
client = new LanguageClient(
'postgres_lsp',
'Postgres LSP',
serverOptions,
clientOptions
);

// Start the client. This will also launch the server
client.start();
Expand Down