@singapor/lsp-plugin
v0.1.1
Published
Editor integration layer for LSP-backed Singapor language features.
Readme
@singapor/lsp-plugin
Editor integration layer for LSP-backed Singapor language features.
This package adapts @singapor/lsp transports to @singapor/core plugins for diagnostics,
completion, hover, definition navigation, references, and document synchronization.
Install
npm install @singapor/core @singapor/lsp @singapor/lsp-pluginUsage
import {
createLanguageServerAdapterPlugin,
createWebSocketLspTransportFactory,
} from '@singapor/lsp-plugin'
const plugin = createLanguageServerAdapterPlugin({
name: 'typescript-lsp',
createTransport: createWebSocketLspTransportFactory('ws://localhost:3000/lsp'),
documentSync: {
shouldSyncLanguageId: (languageId) => languageId === 'typescript',
},
})Exports
createLanguageServerAdapterPlugincreates the full editor integration.createLanguageServerPluginexposes a lower-level plugin factory.createWebSocketLspTransportFactoryandcreateWorkerLspTransportFactorycreate transport factories.- Diagnostic, path, markdown tooltip, completion, and document-sync helpers are available through subpath exports.
