/ blog/vscode-setup-nextjs-go
blog / vscode-setup-nextjs-go / overview.md

My Custom VS Code Setup for Next.js and Go

The exact extensions, settings, and linters I use to maintain productivity across strict Go backend microservices and fluid Next.js frontend code.

Switching contexts between Go and TypeScript can be jarring. Here is how I configure VS Code to handle both seamlessly.

Extensions:

  1. Go (Official)
  2. ESLint & Prettier
  3. Tailwind CSS IntelliSense
  4. Error Lens: Inlines errors next to the code.

Settings.json Magic:

{
  "editor.formatOnSave": true,
  "[go]": {
    "editor.defaultFormatter": "golang.go",
    "editor.codeActionsOnSave": {
      "source.organizeImports": true
    }
  },
  "[typescriptreact]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  }
}

This ensures gofmt runs for Go, and Prettier runs for React, without them fighting each other.

Tags

build-in-publicworkflow
0
0