-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Hi! I stumbled on your package thinking I found exactly what I needed: a monaco-editor
wrapper that would let me use TextMate
to customize the theme
. I've been building my own tsx
tokenizer for 2 days, deep in the Regex hell.
But now that I try your package, even the most minimal implementation will eat up all my memory and the server will never resolve. My project is of a decent size but without your packages, Node.js takes around 2 GB
of memory. With them, Node.js goes up to 10 GB
before I kill it, unless I want my pc to crash... Might it be related to me using Next.js
as a framework?
Any help would be greatly appreciated!
export const CodeEditor = () => {
// {...} some files management here
const [isReady, setIsReady] = useState(false)
useEffect(() => {
initialize.then(() => setIsReady(true))
}, [])
return (
isReady && (
<Edit
programmingLanguage={currentFile.lang}
fileUri={currentFile.path}
height={'75vh'}
onChange={code => (currentFile.code = code)}
options={{
cursorWidth: 2,
fontFamily: 'Fira Code',
fontLigatures: true,
fontWeight: '400',
fontSize: 12,
letterSpacing: 0.5,
lineHeight: 1.6,
wrappingIndent: 'same',
tabSize: 2,
detectIndentation: false,
readOnly: currentFile.readonly,
minimap: {enabled: false},
scrollBeyondLastColumn: 0,
wordBreak: 'keepAll',
wordWrap: 'on'
}}
/>
)
)
}
Metadata
Metadata
Assignees
Labels
No labels