Skip to content

fix(vscode-ext.): use pg_cli #166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
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
10 changes: 6 additions & 4 deletions editors/code/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ExtensionContext } from 'vscode';
import { type ExtensionContext, window } from 'vscode';

import {
type Executable,
Expand All @@ -13,10 +13,11 @@ 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: 'pg_cli',
args: ['lsp-proxy']
};

// const outputChannel = window.createOutputChannel('postgres_lsp');
const outputChannel = window.createOutputChannel('Postgres LSP', { log: true });

const serverOptions: ServerOptions = {
run,
Expand All @@ -26,7 +27,8 @@ export function activate(_context: ExtensionContext) {
// 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' }],
outputChannel
};

// Create the language client and start the client.
Expand Down
2 changes: 1 addition & 1 deletion xtask/src/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ fn install_client(sh: &Shell, client_opt: ClientOpt) -> anyhow::Result<()> {
}

fn install_server(sh: &Shell) -> anyhow::Result<()> {
let cmd = cmd!(sh, "cargo install --path crates/pg_lsp --locked --force");
let cmd = cmd!(sh, "cargo install --path crates/pg_cli --locked --force");
cmd.run()?;
Ok(())
}
Loading