serdarciplak / BlazorMonaco

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

Only javascript language works #104

Closed perilouspete closed 10 months ago

perilouspete commented 1 year 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 11 months ago

Up :) How can we change language ?

serdarciplak commented 10 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 10 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.