-
-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to have intellisense for a language ? (in Nextjs) #560
Comments
You have IntelliSense for the following languages out of the box:
For all other supported languages, you have only syntax highlighting, so you have to implement IntelliSense by yourself by using an appropriate LSP or doing it manually by using a completion provider |
How do I integrate Shiki highlighter? @suren-atoyan I'm currently doing it in const handleEditorWillMount: BeforeMount = async (monaco) => {
// SETUP SHIKI HIGHLIGHTER
// Create the highlighter, it can be reused
const highlighter = await createHighlighter({
themes: ["slack-dark", "vitesse-dark", "vitesse-light"],
langs: ["javascript", "typescript", "css", "html", "json"],
})
// Register the languageIds first. Only registered languages will be highlighted.
monaco.languages.register({ id: "typescript" })
monaco.languages.register({ id: "javascript" })
monaco.languages.register({ id: "css" })
monaco.languages.register({ id: "html" })
monaco.languages.register({ id: "json" })
// Register the themes from Shiki, and provide syntax highlighting for Monaco.
shikiToMonaco(highlighter, monaco)
monaco.editor.addKeybindingRules([
{
keybinding: monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyG,
command: "null",
},
])
} But this has a delay so it doesn't work properly. If I save Any workarounds since I opened a new issue for it here: #641 |
No description provided.
The text was updated successfully, but these errors were encountered: