ngx-monaco-editor
ngx-monaco-editor copied to clipboard
ngx-monaco-editor is showing no Suggestions
Cloned this project & customizing the same - Word Suggestions are coming only for Css & JavaScript languages as they are default.But requirement is Java,Csharp editors.
Html code -
<ngx-monaco-editor [options]="options" [(ngModel)]="displaycode" (onInit)="onInit($event)"></ngx-monaco-editor>
TypeScript code -
options = {theme: 'vs-dark'};
onInit(editor) {
this.editor = editor;
}
I tried
1) options = {theme: 'vs',quickSuggestions: true,wordBasedSuggestions: true};
2) Inside ngOnInit function:
this.options = Object.assign({}, this.options, {theme: 'vs',language: java});
Theme changes are reflecting & if i debug language is updated in options.
3) updateOptions() {
this.toggleLanguage = !this.toggleLanguage;
if (this.toggleLanguage) {
this.code = this.javaCode;
this.options = Object.assign({}, this.options, { language: 'java' });
} else {
this.code = this.cSharpCode;
this.options = Object.assign({}, this.options, { language: 'csharp' });
}
Image of editor showing - no Suggestions
i went through github links like https://github.com/Microsoft/monaco-editor/issues/632, but didn't find any help
How can i get word Suggestion working in the editor for Java & cSharp ? Thanks in advance.
Hi!
I think what you mean is Intellisense for Java and C#, or?
Monaco doesn't have support for Java or C# Intellisense out of the Box...
https://microsoft.github.io/monaco-editor/
haven't tried it for now, but Intellisense for other Languages as the ones which are built-in, should be possible with a Language Server. I don't know a Language Server for Java, but for C# there is Omnisharp! -> http://www.omnisharp.net/ and there is also a Library for Monaco which connects Monaco with a Languageserver. -> https://github.com/TypeFox/monaco-languageclient
I haven't seen any real implementation which uses Monaco and Omnisharp together, but i also have this need and will try to get it working togehter...
As i want Monaco-editor in my angular 5 project i went through https://github.com/Microsoft/monaco-typescript
I want the editor to support C sharp & Java on a toggle button. Auto-suggestion, indentation & other things are fine. But the entire code is in same color. Am expecting Keywords (like 'import' ) in different color.
I went through
- https://github.com/Microsoft/monaco-editor/blob/master/test/playground.generated/customizing-the-appearence-tokens-and-colors.html
- https://github.com/Microsoft/monaco-css
- monaco.editor.colorizeElement(document.getElementById('container'));
- https://github.com/TypeFox/monaco-languageclient
But no changes are reflected. Any help on this ?
Is something implemented to solve this?
I want the recommendation to work with java and csharp, and java.
@manasagirinatham Did you solve the problem of the colors?
i handed over the problem to tech lead, so not sure about the status. Will ping you once i came to know the update.
On Fri, Oct 12, 2018 at 12:13 PM YeisonGomez [email protected] wrote:
Is something implemented to solve this?
I want the recommendation to work with java and csharp, and java.
@manasagirinatham https://github.com/manasagirinatham Did you solve the problem of the colors?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/atularen/ngx-monaco-editor/issues/45#issuecomment-429221456, or mute the thread https://github.com/notifications/unsubscribe-auth/AUBHdds6AFzhkqAye_j20ZcjrHu3Zitfks5ukDn4gaJpZM4Ti43p .
Is anyone got an idea how to add java language support with monaco editor