What's Changed
- add
manualSessionControl
provider option to disable automatic session registration. When enabled, you must manually handle session changes:
// Create provider with manual session control
let languageProvider = LanguageProvider.create(worker, {
manualSessionControl: true
});
// Register sessions manually
languageProvider.registerSession(editor.session, editor, {
filePath: 'path/to/file.ts',
joinWorkspaceURI: true
});
// Handle session changes manually
editor.on("changeSession", ({session}) => {
languageProvider.registerSession(session, editor, session.lspConfig);
});
- add
setSessionLspConfig
method to set LSP configuration on Ace sessions:
// Set LSP configuration on session
languageProvider.setSessionLspConfig(editor.session, {
filePath: 'src/components/MyComponent.tsx',
joinWorkspaceURI: true
});
- add
setDocumentOptions
method to replace deprecatedsetSessionOptions
:
// Configure document-specific options (replaces setSessionOptions)
languageProvider.setDocumentOptions(editor.session, {
// service-specific options here
});
Full Changelog: v1.8.0...v1.8.1