Monaco editor obscures code

Is it my imagination or has the monaco editor become more eager than ever to cover up the code I'm trying to edit?

I quite like the simple explanation "Cannot find name 'flo' " in the smaller popover, but what is valuable enough about "any" or "Did you mean 'flow'? (2552) to be worth sticking over the top of the editor?

As for the larger popover - a list of everything the editor knows which starts with F ? And all that empty grey space! It keeps on changing the popover contents with each letter I type too. Perhaps it would be slightly less infuriating if it didnt dispay any of this junk until say 2 seconds inactivity.

Is there any way to control this popover behaviour?

1 Like

Try in your settings.js file .. under monaco options

quickSuggestionsDelay: 2000,  // ms

Yes. Lots of tweaks possible. All in your settings.js follow the link.

Hmm. It makes a difference but I think it's actually less usable.
Take this function code.

let tablist = flow.get("tablist")
for (let i in msg.payload) {
    let newmsg = {}
    if (msg.payload[i].type == "junction") {
        newmsg.payload = {"id": msg.payload[i].id, "Tab": tablist[msg.payload[i].z]}
        if (msg.payload[i].wires[0].length == 0) {
            node.send([null, newmsg])
        else {
            node.send([newmsg, null])
return (tablist)

I want to change all incidences of variable i to foo
I change the first instance then move the cursor down two lines to the first [i]. Just as I'm about to mouse click, this pops up

And now I'm trapped. Cant use the arrow keys because they just move up and down the popup. Can't click to go to my chosen location because that replaces some of my code with an insane function prototype.

Monaco is supposed to be a good editor, but my conclusion is that [in the default configuration for Node-red] it's totally out of control.

I'm going back to the old editor.

what about increasing the delay even higher .. more than 2 sec
or disable the suggestions ?

snippetSuggestions : "none",

ps. actually im gonna keep this setting also .. cause yea those suggestion can be a bit annoying :wink:

Click escape.

I suspect you can stop it popping up in the first place, but I haven't studied the link in settings yet.

Terrible Idea. Do you know the function signature of context.get? parseInt? Etc etc.

Yes, the suggestions can be annoying if you look at them when you don't need to.

My advice is to stop fighting it. Finish your line of text and the suggestions will disappear. However, if you get stuck you can look at the suggestions.

Additionally, anytime you want suggestions to disappear, hit escape.

I find code completion and parameter tips far more valuable than debugging something because I missed a parameter or use the wrong type.

Warning - may contain gratuitous references to early MS Word features

I know that Monaco brings some benefits Steve and sometimes the info it volunteers might be useful but surely not at the expense of me seeing what I am typing, in the context of the code around it.

Perhaps there is some way to shift the location of the popover?

to this?

Yup the escape key is valuable when using a sensible code editor - vi, but even in that famously obscure editor you don't have to keep hitting it while in insert mode

I agree that it would be nice if it popped up but did not cover the cursor area.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.