codeLens still creates stylesheet when disabled #3746
-
monaco-editor version: 0.25.1 monaco.editor.create(document.getElementById("container"), {
codeLens: false,
value: "function hello() {\n\talert('Hello world!');\n}",
language: "javascript"
});
const hasCodelensStyles =
Array.from(document.querySelectorAll('style[media="screen"]'))
.some(style => style.textContent.includes('codelens'));
alert(hasCodelensStyles) If codeLens is disabled, monaco editor should not initialize the stylesheet. This can be traced back to this line here: https://github.com/microsoft/vscode/blob/2e165500a6d5449fdd076f0ddbaa588f1e5743c7/src/vs/editor/contrib/codelens/codelensController.ts#L67 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Would even accept a workaround where it would disable adding just the style sheets |
Beta Was this translation helpful? Give feedback.
-
With the Monaco Editor Webpack Plugin it is possible to exclude the codelens.ts file completely if you don't want that feature. |
Beta Was this translation helpful? Give feedback.
With the Monaco Editor Webpack Plugin it is possible to exclude the codelens.ts file completely if you don't want that feature.