First iteration of monaco editor lsp client (#5044)

This commit is contained in:
Henning Dieterichs 2025-10-10 12:18:12 +02:00 committed by GitHub
parent a59f6c8a72
commit 0fd6f29a23
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
42 changed files with 14026 additions and 4 deletions

View file

@ -60,7 +60,7 @@ export default defineConfig({
compilerOptions: {
stripInternal: true
},
includeExternal: ['monaco-editor-core']
includeExternal: ['monaco-editor-core', '@vscode/monaco-lsp-client']
})
]
});

View file

@ -65,6 +65,15 @@ function getWorkerBootstrapUrl(workerScriptUrl: string | URL) {
import 'vs/nls.messages-loader!';
export * from '../../../src/editor/editor.main';
// for now, lsp is only available to amd build
import * as lsp from '@vscode/monaco-lsp-client';
export { lsp };
// TODO@hediet get rid of the monaco global
if ((globalThis as any).monaco) {
(globalThis as any).monaco.lsp = lsp;
}
const styleSheetUrl = require.toUrl('vs/editor/editor.main.css');
const link = document.createElement('link');

View file

@ -21,6 +21,9 @@ export default defineConfig(async (args) => {
/** @type {import('vite').UserConfig} */
return {
base: './',
resolve: {
dedupe: ['monaco-editor-core']
},
build: {
lib: {
cssFileName: 'editor/editor.main',