lab.js icon indicating copy to clipboard operation
lab.js copied to clipboard

add - autoCompletion

Open rbalet opened this issue 4 years ago • 2 comments

For : #55 Notes
inside components/Editor/index.js a change to be noted is :

  componentWillUnmount = () => {
    this.IDisposable.dispose()
  }

This will dispose the the completion proposal when you change the editor.
If you don't then it will create multiple time the same snippets proposal
image

Known error When you opening a html editor, then go to the overlay and try edit into the HTML, then you will see twice the "this.parameters" snippets. It's not fixable for the moment since it's an error from the Monaco Editor.

I think, we can still live with this issue since nobody would see it and it wont break the ux.

If you are merging this pull request, could you open an Issue with a wontfix label?

rbalet avatar Dec 19 '19 09:12 rbalet

Hi, and thanks a lot! Before I go through this in detail, a quick question: It looks to me that a large part of this code is adapted verbatim from https://gist.github.com/mwrouse/05d8c11cd3872c19c684bd1904a2202e . It looks to me as if the gist is not available under an open source license, but maybe I'm missing something. In either case, could you please make sure you have the appropriate rights?

Thanks again, and I look forward to reviewing this in detail! -F

FelixHenninger avatar Dec 19 '19 10:12 FelixHenninger

Hi @FelixHenninger, all the code I developped was created by myself with the help the help of those both topics :
for the autocompletion : https://microsoft.github.io/monaco-editor/playground.html#extending-language-services-completion-provider-example
For the idea about the disposale : https://github.com/react-monaco-editor/react-monaco-editor/issues/88#issuecomment-561554266
So, feel free to merge it without any fear (None of my code will be copy pasted from another none openSource library, and I basically try to never copy paste my code '^^ )

rbalet avatar Dec 21 '19 22:12 rbalet