[英]ngx-monaco-editor is showing no Suggestions
I went through [ngx-monaco-editor]: https://github.com/atularen/ngx-monaco-editor 我经历了[ngx-monaco-editor]: https : //github.com/atularen/ngx-monaco-editor
Cloned the project & customizing the same - Word Suggestions are coming only for Css & JavaScript languages as they are default.But requirement is Java,Csharp editors. 克隆了项目并进行了相同的自定义-Word建议仅针对Css和JavaScript语言提供,因为它们是默认语言。
Html code - HTML代码-
<ngx-monaco-editor [options]="options" [(ngModel)]="displaycode" (onInit)="onInit($event)"></ngx-monaco-editor>
TypeScript code - TypeScript代码-
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 我经历了https://github.com/Microsoft/monaco-editor/issues/632之类的github链接,但没有找到任何帮助
How can i get word Suggestion working in the editor for Java & cSharp ? 如何在Java和cSharp的编辑器中使用单词建议功能? Thanks in advance.
提前致谢。
If you're looking for content assist support, you should look at TypeFox's monaco-languageclient project. 如果您正在寻找内容辅助支持,则应查看TypeFox的monaco-languageclient项目。 You can then connect your Monaco editor with a C# or Java language server to get code completion suggestions.
然后,您可以将Monaco编辑器与C#或Java语言服务器连接,以获取代码完成建议。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.