crmsnbleyd,
@crmsnbleyd@emacs.ch avatar

go has 8 space tabs and not sure how to deal with that from within Emacs, setting tab-width doesn't do anything. So I just have to deal with wildly right-aligned code, even two nests deep.

This is with go-ts-mode.

anderseknert,
@anderseknert@hachyderm.io avatar

@crmsnbleyd I don’t know about emacs, but the editors I work with, and the GitHub UI all respect an .editorconfig file for setting this project wide

holgerschurig,

@anderseknert @crmsnbleyd Emacs has a plug-in to honor .editorconfig.

Another option is to use dtrt-indent. It is analyzes an existing file and sets up Emacs to mimick that exact tab/space indention to style.

But even without external modules you can configure the behavior of the tab key and how a tab character is viewed. It is however a tad bit complicated, because Emacs can have C, Python and Go files open, all with their specific preferences ...

Maybe this brings you forward?

https://www.emacswiki.org/emacs/IndentationBasics

https://www.gnu.org/software/emacs/manual/html_node/emacs/Indentation.html

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • everett
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • rosin
  • GTA5RPClips
  • Durango
  • Youngstown
  • slotface
  • khanakhh
  • kavyap
  • ngwrru68w68
  • tacticalgear
  • JUstTest
  • osvaldo12
  • tester
  • cubers
  • cisconetworking
  • mdbf
  • ethstaker
  • modclub
  • Leos
  • anitta
  • normalnudes
  • megavids
  • provamag3
  • lostlight
  • All magazines