I'm using web-mode 13.1.25, but was until today on 12.x with the same issue.
It seems I need to continually choose Highlight buffer (C-c C-h)
as otherwise, certain functions misbehave.
These steps demonstrate the problem:
- Adding
<p>Foo
into the body...
<body>
<p>Foo
</body>
- When beginning to type the closing tag
<body>
<p>Foo</
</body>
3. It completes to the wrong tag.
<body>
<p>Foo</body>
</body>
If, however, I type <p>Foo
, then type C-C C-h
to update highlighting, then when typing the closing tag it auto-completes correctly.
Is it possible to have the current region or the entire buffer's syntax highlighting auto-updated when entering text or a tag?
Is there some setting I'm missing? Is there a recommended workflow?
Thanks!
(setq whitespace-line-column 80000)
seemed to cause the issue. Commenting that out enabled normal behaviour. See github.com/fxbois/web-mode/issues/730#issuecomment-241332750