FE-Mars/monaco-editor-vue

Auto Completion doesn't work

Closed this issue · 4 comments

Pressing Ctrl + Space should show Auto Completion. Doesn't work.

Similar problems #25

Which Document you mean exactly ? By default that works in the Monaco Playground Examples on the Microsoft Side. Did you disable it by default ?

I added all Features to make sure to not miss anything. But it doesn't work.

image

vikyd commented

for JavaScript auto completion in vue.config.js:

module.exports = {
  chainWebpack: (config) => {
    config.plugin('monaco-editor').use(MonacoWebpackPlugin, [
      {
        // Languages are loaded on demand at runtime
        languages: ['json', 'javascript', 'html', 'xml'],
        // languages: ['typescript', 'javascript', 'json', 'html', 'xml'],
      },
    ])
  },
}

because monaco-editor-webpack-plugin :

Some languages share the same web worker. If one of the following languages is included, 
you must also include the language responsible for instantiating their shared worker:
Language Instantiator
javascript typescript
handlebars html
scss, less css