JSTQL-JS-Transform/JSTQL/src/language/main.ts

13 lines
553 B
TypeScript

import { startLanguageServer } from 'langium';
import { NodeFileSystem } from 'langium/node';
import { createConnection, ProposedFeatures } from 'vscode-languageserver/node.js';
import { createJstqlServices } from './jstql-module.js';
// Create a connection to the client
const connection = createConnection(ProposedFeatures.all);
// Inject the shared services and language-specific services
const { shared } = createJstqlServices({ connection, ...NodeFileSystem });
// Start the language server with the shared services
startLanguageServer(shared);