Spacemacs Web Mode - Indentation not working as expected
Asked Answered
B

1

22

I'm trying to get started using Spacemacs for an Elixir/Phoenix web project.

When editing one of my HTML templates (myfile.html.eex), the indentation displayed in Spacemacs is not as expected.

The HTML content is displayed way over to the right of the screen. When I put my cursor onto the line with the HTML, it (temporarily) moves into the right spot. It then moves back over to the right once the cursor leaves the line.

If I access a different file, then come back again, (SPC-TAB SPC-TAB) the formatting is correct.

This behavior is distracting/annoying. Any way to fix it?

Text floating way over to the right: Text floating way over to the right

Cursor over the line, it moves into the correct location: Cursor over the line, it moves into the correct location

Move cursor off the line, it goes back to the wrong spot on the right: Move cursor off the line, it goes back to the wrong spot on the right

Access a different file and come back - everything looks right: Access a different file and come back - everything looks right

Boiardo answered 9/7, 2017 at 20:52 Comment(6)
Do you reproduce the issue with plain emacs and/or without web-mode?Dalton
@Dalton I don't get the same indentation issues when editing the HTML file above in text mode. I also don't have this issue when editing other code in the relevant minor mode (i.e. elixir code in elixir mode). It appears to be something specific with web mode.....Boiardo
You should report the bug against web-mode on github i guessDalton
What version are you using ? Also, can you enable the white spaces to check if there is something in between the text.Foregut
@rach8garg It's obviously been a while since I posted this. I just installed an updated version of Spacemacs on a clean-installed Mac, and I am no longer seeing this issue. It must have been fixed at some point either by the Spacemacs team, or the folks working directly on web mode.Boiardo
I am still facing the same issue on plain emacs with electric-indent and web-mode enabledHemorrhage
M
1

Install an updated version of Spacemacs, and I believe the Spacemacs team fixed this issue a while back.

Mailand answered 17/5, 2021 at 22:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.