Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monaco incorrectly completes plain text. #1208

Closed
hifall opened this issue Nov 24, 2018 · 2 comments · May be fixed by MarcelRaschke/monaco-editor#25
Closed

Monaco incorrectly completes plain text. #1208

hifall opened this issue Nov 24, 2018 · 2 comments · May be fixed by MarcelRaschke/monaco-editor#25

Comments

@hifall
Copy link

hifall commented Nov 24, 2018

monaco-editor version: 0.14.0
Browser: Chrome 70
OS: macOS 10.12

Steps or JS usage snippet reproducing the issue:
I use Monaco editor to edit plain text, among other languages. Monaco offers irrelevant completion candidates while I type. I'd like to disable completion for plain text. After applying the suggestion of using noLib from Stack Overflow like this:

monaco.languages.plaintext.plaintextDefaults.setCompilerOptions({ noLib: true });

I am getting:

error TS2339: Property 'plaintext' does not exist on type 'typeof languages'.

How can I disable completion for plain text? Thanks!

@spahnke
Copy link
Contributor

spahnke commented Nov 24, 2018

Hi,

you can set wordBasedSuggestions: false when creating the editor:

monaco.editor.create(document.getElementById("container"), {
    value: "asdf",
    language: "plaintext",
    wordBasedSuggestions: false
});

Regards,
Sebastian

@hifall
Copy link
Author

hifall commented Nov 24, 2018

Awesome. Thanks!

@hifall hifall closed this as completed Nov 24, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants