molecule
                                
                                
                                
                                    molecule copied to clipboard
                            
                            
                            
                        实现代码自动补全
Question
如何实现代码自动补全功能,https://dtstack.github.io/molecule/zh-CN/docs/advanced/customize-workbench 并没有讲解有什么办法去实现,有什么案例或者可以方法去实现吗
Question
如何实现代码自动补全功能,https://dtstack.github.io/molecule/zh-CN/docs/advanced/customize-workbench 并没有讲解有什么办法去实现,有什么案例或者可以方法去实现吗
这个都是基于 monaco-editor 提供的 langauge API 来实现的,可以参考下这个项目:
https://github.com/DTStack/dt-react-monaco-editor/blob/master/src/components/editor/languages/dt-python/simpleComplete.ts
另外,这个目录下的 language 都有实现自动提示方面的示例:
https://github.com/microsoft/monaco-editor/tree/main/src/language
I have already written the method of automatic code completion in Python. How can I import it? This direct import will report an error

@BojunZhong https://github.com/DTStack/Taier/blob/master/taier-ui/src/extensions/languages/index.tsx 看看这个地方
或者这个工程:
https://github.com/DTStack/monaco-sql-languages/blob/main/web/app.js