|
|
|
@ -40,11 +40,9 @@ export class CodeEdit extends HTMLElement { |
|
|
|
} |
|
|
|
|
|
|
|
set fileType(value) { |
|
|
|
console.log('filetype', value) |
|
|
|
this._fileType = value |
|
|
|
if (this.view) { |
|
|
|
const langPlugins = this.langPlugins |
|
|
|
console.log({langPlugins}) |
|
|
|
this.view.dispatch({ |
|
|
|
effects: |
|
|
|
this.languageCompartment.reconfigure(langPlugins) |
|
|
|
@ -75,7 +73,6 @@ export class CodeEdit extends HTMLElement { |
|
|
|
const cm = window.CodeMirrorBasic |
|
|
|
this.languageCompartment = new cm.Compartment() |
|
|
|
const langPlugins = this.langPlugins |
|
|
|
console.log({langPlugins}) |
|
|
|
const basicSetup = [ |
|
|
|
cm.lineNumbers(), |
|
|
|
cm.highlightActiveLineGutter(), |
|
|
|
|