microsoft / microsoft/monaco-editor

Allow changing the wordBasedSuggestions via configuration service

Open
#1,498 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

editor-api feature-request
Dominant language
JavaScript
Stars
46.8k
Forks
4.1k
Avg merge
17h 58m
Merged PRs (30d)
1

Description

monaco-editor version: 0.17.0
Browser: Chrome
OS: Windows 10
monaco editor with custom added typescript definition files.
for language = javascript Intellisense shows all words ignoring the wordBasedSuggesions setting.

var mEditor = monaco.editor.create(document.getElementById(editorId), {
                    value: '',
                    language: 'javascript',
                    automaticLayout: true,
                    scrollBeyondLastLine: false,
                    wordBasedSuggestions: false
                });
mEditor.setModel(null);
//@ts-ignore
var model = monaco.editor.createModel('', 'javascript', filename);
mEditor.setModel(model);

See below. Clearly all symbols except ArrayUtils ( provided by a d.ts ) are not fit as a property of variable a.

image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the provided Monaco Editor reproduction, especially the wordBasedSuggestions option and the setModel/createModel sequence. Trace how the configuration is applied when the JavaScript model is replaced, then verify that disabling word-based suggestions suppresses unrelated symbols while retaining the custom ArrayUtils definition.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.