Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

monaco-editor: hide overview ruler

Is there a way to completely hide overview ruler in monaco-editor? It is still visible with the following:

        overviewRulerLanes: 0,
        hideCursorInOverviewRuler: true,
        scrollbar: {
            vertical: 'hidden'
        },
        overviewRulerBorder: false,
like image 639
eprst Avatar asked Jan 25 '19 21:01

eprst


2 Answers

If you want to hide the scroll bar, you can do this

const monacoInstance=monaco.editor.create(document.getElementById("editor"),{
    value:`console.log("hello,world");console.log("hello,world");console.log("hello,world");console.log("hello,world");console.log("hello,world");console.log("hello,world");console.log("hello,world");console.log("hello,world");console.log("hello,world");console.log("hello,world");console.log("hello,world");console.log("hello,world");console.log("hello,world");console.log("hello,world");\nconsole.log("hello,world");\nconsole.log("hello,world");\nconsole.log("hello,world");\nconsole.log("hello,world");\nconsole.log("hello,world");\nconsole.log("hello,world");\nconsole.log("hello,world");\nconsole.log("hello,world");\nconsole.log("hello,world");\nconsole.log("hello,world");\nconsole.log("hello,world");\nconsole.log("hello,world");\nconsole.log("hello,world");\nconsole.log("hello,world");`,
    language:"javascript",
    // theme:"vs-dark",
    readOnly:true,
    minimap:{enabled:false},
    overviewRulerLanes: 0,
    scrollbar: {
        vertical:"hidden",
        horizontal: "hidden",
        handleMouseWheel:false,
    },
    wordWrap: 'on',
})
like image 72
Zolay Avatar answered Sep 18 '22 22:09

Zolay


Did you mean this?

if so:

minimap: {enabled: false}

like image 27
korewayume Avatar answered Sep 20 '22 22:09

korewayume