Files
Your NameandClaude Opus 5.5 7cf9727bcd Rename the language from Dino to Rex
Files use .rex, the command is rex, and the crate, runtime prefixes,
docs, editor files and examples all use the new name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:51:23 +01:00

27 lines
799 B
JavaScript

// Starts `rex lsp` and connects the editor to it. All the work is done by the compiler.
const vscode = require('vscode');
const { LanguageClient } = require('vscode-languageclient/node');
let client;
function activate() {
const command = vscode.workspace.getConfiguration('rex').get('serverPath') || 'rex';
client = new LanguageClient(
'rex',
'Rex Language Server',
{ command, args: ['lsp'] },
{ documentSelector: [{ scheme: 'file', language: 'rex' }] }
);
client.start().catch((err) => {
vscode.window.showErrorMessage(
`Could not start "${command} lsp": ${err.message}. Put the rex program on your PATH or set "rex.serverPath".`
);
});
}
function deactivate() {
return client ? client.stop() : undefined;
}
module.exports = { activate, deactivate };