gopls config ที่ทำให้ทีมเขียน Go เร็วขึ้น 30%
Settings ที่ unlock semantic tokens, staticcheck, hover doc แบบเต็ม. setting.json พร้อม copy
2026-03-15 · 5 นาที · nat-touring.dev
gopls คือ language server ที่ดี แต่ default config ของ VS Code ขาด feature ที่ทำให้มันเปลี่ยนวิธีเขียน Go ไปทั้งหมด: semantic tokens, staticcheck integration, hover doc แบบเต็ม.
หลังจากเปลี่ยน config นี้ ทีมผมเขียน Go เร็วขึ้น ~30% ใน 2 sprint. settings.json พร้อม copy อยู่ในโพสต์.
// .vscode/settings.json
{
"gopls": {
"semanticTokens": true,
"staticcheck": true,
"hoverKind": "FullDocumentation",
"usePlaceholders": true
}
}อย่าลืม `gopls.usePlaceholders: true` — มันเปลี่ยนการ autocomplete signatures ทั้งหมด.
หน้านี้มีลิงก์ affiliate. หากกดและสั่งซื้อ ผมอาจได้ค่าคอมมิชชั่นเล็กน้อย โดยไม่มีค่าใช้จ่ายเพิ่มกับคุณ. ผมแนะนำเฉพาะของที่ใช้จริงเท่านั้น. อ่านนโยบายฉบับเต็มที่ /disclosure.