Skip to content

Instantly share code, notes, and snippets.

@kinboyw
Last active April 12, 2024 18:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kinboyw/6b1453c62d4aee1f071863fc10cb4577 to your computer and use it in GitHub Desktop.
Save kinboyw/6b1453c62d4aee1f071863fc10cb4577 to your computer and use it in GitHub Desktop.
vscode-highlight-settings-for-golang
// replace the default golang setting in the settings.json of vscode with the below json snippet
// you need to install 【JetBrains Mono】fonts on your local machine, https://www.jetbrains.com/zh-cn/lp/mono/
// highlighting style preview, https://i.imgur.com/uH3HC5G.png
"[go]": {
"editor.insertSpaces": false,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
"editor.suggest.snippetsPreventQuickSuggestions": false,
},
"editor.fontFamily": "'JetBrains Mono',Consolas, 'Courier New', monospace",
"editor.lineHeight": 1.7,
"editor.fontWeight": "normal",
"workbench.colorTheme": "Default Dark Modern",
"workbench.colorCustomizations": {
/* "editorBracketHighlight.foreground1": "#919daa",
"editorBracketHighlight.foreground2": "#2786d4",
"editorBracketHighlight.foreground3": "#6b56e0",
"editorBracketHighlight.foreground4": "#d86262",
"editorBracketHighlight.foreground5": "#e0af53",
"editorBracketHighlight.foreground6": "#61cf86", */
"editorBracketHighlight.foreground1": "#919daa",
"editorBracketHighlight.foreground2": "#919daa",
"editorBracketHighlight.foreground3": "#919daa",
"editorBracketHighlight.foreground4": "#919daa",
"editorBracketHighlight.foreground5": "#919daa",
"editorBracketHighlight.foreground6": "#919daa",
"editorBracketMatch.background": "#3b514d",
"editorBracketMatch.border": "#3b514d",
"editor.background": "#2b2b2b",
"editor.foreground": "#919daa",
},
"gopls": {
"ui.semanticTokens": true,
},
"editor.semanticTokenColorCustomizations":{
"enabled":true,
"[Darcula]": {
"enabled": true,
"rules":{
"namespace": "#afbf7e",
"type":"#6fafbd",
"parameter": "#919daa",
}
}
},
"editor.semanticHighlighting.enabled": "configuredByTheme",
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "entity.name.function",
"settings": {
"foreground": "#b09d79",
}
},{
"scope":"entity.name.function.member",
"settings": {
"foreground": "#ffc66d",
}
},{
"scope":"keyword.operator",
"settings": {
"foreground": "#919daa",
}
},{
"scope":"punctuation.other.comma.go",
"settings": {
"foreground": "#CC8242",
}
},{
"scope":"variable.other.readwrite",
"settings": {
"foreground": "#919daa",
"fontStyle": "bold"
}
},{
"scope":"variable.other",
"settings": {
"foreground": "#9876aa",
"fontStyle": "bold"
}
}
],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment