setting up emacs for go programming language

This page summarizes the projects mentioned and recommended in the original post on /r/emacs

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • goimports

    [mirror] Go Tools (by golang)

  • It seems that most Go utilities have been submerged into gopls, the LSP server. So a lot of older websites that suggest how to configure go-mode might be outdated, because of the cultural shift away from the unix-ish little, collaborative utilities approach. This means you will need a LSP client -- the Go project has some documentation on that. I'd strongly recommend Eglot, if you are uncertain what to use(0). This page explains how to install gopls with your Go toolchain.

  • go-tools

    Staticcheck - The advanced Go linter

  • I think that the one tool that might still be useful outside of gopls is goimports. It can be used as a gofmt replacement, that also automatically manages and removes imports. Gopls can integrate staticcheck and gofumpt, but my understanding is that they have to be installed manually. See the settings section for more on that(1).

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • GNU/Emacs go-mode

    Emacs mode for the Go programming language

  • It seems that most Go utilities have been submerged into gopls, the LSP server. So a lot of older websites that suggest how to configure go-mode might be outdated, because of the cultural shift away from the unix-ish little, collaborative utilities approach. This means you will need a LSP client -- the Go project has some documentation on that. I'd strongly recommend Eglot, if you are uncertain what to use(0). This page explains how to install gopls with your Go toolchain.

  • gofumpt

    A stricter gofmt

  • I think that the one tool that might still be useful outside of gopls is goimports. It can be used as a gofmt replacement, that also automatically manages and removes imports. Gopls can integrate staticcheck and gofumpt, but my understanding is that they have to be installed manually. See the settings section for more on that(1).

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts