I’m new here, a neovim exile as I don’t like the racism.

I’ve compiled emacs 31 and I’m using eglot, php-ts-mode and phpantom_lsp (also tried phpactor). I’m trying to get it to auto indent/reformat using two spaces, not tabs, not four spaces!

Things I’ve tried:

  • (setq-default tab-width 2)
  • (setq tab-width 2)
  • install editorconfig package, add an .editorconfig file in the project root. It’s enabled, apparently but still getting 4 spaces.
  • I read that when eglot is in use it defers formatting to the lsp. So I tried configuring that, but still getting 4. I still get 4 after M-x eglot-shutdown too, so I don’t think it’s eglot ?

Any help appreciated!