How to get 2 spaces for tab? [SOLVED!]
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
editorconfigpackage, add an.editorconfigfile 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-shutdowntoo, so I don't think it's eglot ?
Any help appreciated!
1 reply
Ah ha, thanks to @[email protected] over on mastodon, it seems the answer is:
(setopt php-ts-indent-offset 2)