serdarciplak / BlazorMonaco

Blazor component for Microsoft's Monaco Editor which powers Visual Studio Code.
https://serdarciplak.github.io/BlazorMonaco/
MIT License
432 stars 98 forks source link

Only javascript language works #104

Closed perilouspete closed 6 months ago

perilouspete commented 11 months ago

Hi

I have changed the language to csharp but then there is no completion the only language that works is javascript

private StandaloneEditorConstructionOptions EditorConstructionOptions(StandaloneCodeEditor editor) { return new StandaloneEditorConstructionOptions { Language = "csharp"

};

}

Am I doing something wrong?

bao86 commented 7 months ago

Up :) How can we change language ?

serdarciplak commented 6 months ago

The language support is managed by Monaco Editor and as it supports "csharp" as a language, BlazorMonaco also supports that. Is it possible that you may have a custom integration? For example, the library mentioned here is said to be supporting only JSON and YAML. This may be a similar thing.

serdarciplak commented 6 months ago

As you can see here, Monaco Editor (and thus BlazorMonaco) supports csharp. You can use the StandaloneEditorConstructionOptions.Language property in BlazorMonaco to set the language of an editor instance.