Author Topic: Problems with golang indentation?  (Read 1099 times)

rr0

  • Junior Community Member
  • Posts: 5
  • Hero Points: 0
Problems with golang indentation?
« on: October 22, 2021, 10:33:17 PM »
Hi Everyone, I’m a Slickedit novice & a registered Pro user for a handful of years now. I’m using Mac OS + emacs keyboard emulation.

For grins I’m trying v26 on a golang project that I’ve been working on. Set up the workspace & project and have triple checked the obvious language config settings in Google Go > Editing/Formatting, but indentation just doesn’t seem to be working for me. Indentation is working correctly in a C++ project, btw.

For example, this is what the editor is generating when I’m writing go code. Pressing tab doesn’t indent, either.

func testFunc(cfg initConfig) error {
if cfg.a != “” {
return errors.New(“hello world”)
}
}

What am I missing?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6866
  • Hero Points: 528
Re: Problems with golang indentation?
« Reply #1 on: October 23, 2021, 02:09:11 AM »
Smart indenting for Go is definitely not working as well as it should. We will look into this.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6866
  • Hero Points: 528
Re: Problems with golang indentation?
« Reply #2 on: October 27, 2021, 12:47:18 AM »
What platform(s) do you need? Had to build new installers to make this much better.

rr0

  • Junior Community Member
  • Posts: 5
  • Hero Points: 0
Re: Problems with golang indentation?
« Reply #3 on: October 28, 2021, 05:47:03 AM »
Hi Clark, thank you for working on this. I’m currently using Intel Mac OS.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6866
  • Hero Points: 528
Re: Problems with golang indentation?
« Reply #4 on: October 28, 2021, 01:39:15 PM »

rr0

  • Junior Community Member
  • Posts: 5
  • Hero Points: 0
Re: Problems with golang indentation?
« Reply #5 on: October 29, 2021, 02:50:53 AM »
Hi Clark, works great. Thank you!