A customizable language server protocol with full integration with vscode..!
[8] @je-es/lsp 🚀
To understand the full context, please refer to these documents.
# install using npm
npm install @je-es/lsp// import using typescript
import * as lsp from "@je-es/lsp";Example:
// for vscode
import { createConnection, ProposedFeatures } from 'vscode-languageserver/node';
import { TextDocuments } from 'vscode-languageserver';
import { TextDocument } from 'vscode-languageserver-textdocument';
// core
import { LSP } from '@je-es/lsp';
// your syntax
import { KemetSyntax } from '@kemet-lang/rules';then inside the vscode lsp
server.tsfile :
try {
// Create connection and document manager
const connection = createConnection(ProposedFeatures.all);
const documents = new TextDocuments(TextDocument);
// Initialize the LSP with syntax and workspace root
const lsp = new LSP(connection, documents, {
syntax : KemetSyntax,
rootPath : process.cwd()
});
// Start the server
lsp.start();
console.log('[SERVER] Kemet LSP Server started successfully! 🚀');
} catch (error) {
console.error('[SERVER] FATAL ERROR during initialization:', error);
if (error instanceof Error) {
console.error('Message:', error.message);
console.error('Stack:', error.stack);
}
process.exit(1);
}1. @je-es/lexer
4. @je-es/ast
8.
@je-es/lsp
"
Currently I'm working on a larger lsp, so I'll skip writing documentation for now due to time constraints.
"

