0.1.9 • Published 8 months ago
monaco-python v0.1.9
monaco-python
monaco-editor with python lsp in browser
install
npm i monaco-python
usage
basic usage
import start from 'monaco-python';
await start(document.getElementById('container'), {
value: 'print("hello world!")'
});
customize theme
import start, { E_EDITOR_THEME } from 'monaco-python';
await start(document.getElementById('container'), {
theme: E_EDITOR_THEME.MONOKAI,
});
customize typesheds
import start from 'monaco-python';
await start(document.getElementById('container'), {
typesheds: {
'stubs/testtt/testtt.pyi': 'def test(words: str) -> str: ...'
}
});
customize typesheds
import start from 'monaco-python';
await start(document.getElementById('container'), {
snippets: {
testtt: {
prefix: "tt",
body: "testtt(${1:words})",
description: "testtt"
}
}
});
vim mode
import start from 'monaco-python';
import { initVimMode } from 'monaco-vim';
const wrapper = await start(document.getElementById('container'), {
value: 'print("hello world!")'
});
const editor = wrapper.getEditor();
const vimMode = initVimMode(editor, document.getElementById('my-statusbar'))
0.1.8
8 months ago
0.1.9
8 months ago
0.1.7
9 months ago
0.1.6
10 months ago
0.1.5
10 months ago
0.1.4
10 months ago
0.1.3
10 months ago
0.1.2
10 months ago
0.1.1
10 months ago
0.1.0
10 months ago
0.0.7
10 months ago
0.0.6
10 months ago
0.0.5
10 months ago
0.0.4
10 months ago
0.0.3
10 months ago
0.0.2
10 months ago
0.0.1
10 months ago