Microsoft/monaco-editor

Improve Go syntax highlighting

開放

#1,770 建立於 2020年1月17日

 (0 則留言) (0 個反應) (0 位負責人)JavaScript (4,064 個分叉)batch import
feature-requestgrammarshelp wantedopen for PR

倉庫指標

星標
 (46,002 顆星)
PR 合併指標
 (平均合併 6小時 26分鐘) (30 天內合併 15 個 PR)

描述

monaco-editor version: 0.19.3 Browser: Chrome 79 maybe OS: macOS Mojave Playground code that reproduces the issue:

monaco.editor.create(document.getElementById("container"), {
	value: 'fmt.Println("666")',
	language: "go"
});

How Monaco/Monarch highlights things:

image

How VSCode highlights things:

Also in VSCode (latest, not Insiders) that line of code is highlighted differently once rendered from Markdown, I think it's ok to expect some differences since my editor has a dark background and the rendered Markdown has a light background, but here a method's name is no longer of a different color as far as I can see, and that seems a bit too much of a difference:

貢獻者指南