mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 05:50:11 +01:00
First iteration of monaco editor lsp client (#5044)
This commit is contained in:
parent
a59f6c8a72
commit
0fd6f29a23
42 changed files with 14026 additions and 4 deletions
|
|
@ -60,7 +60,7 @@ export default defineConfig({
|
|||
compilerOptions: {
|
||||
stripInternal: true
|
||||
},
|
||||
includeExternal: ['monaco-editor-core']
|
||||
includeExternal: ['monaco-editor-core', '@vscode/monaco-lsp-client']
|
||||
})
|
||||
]
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue