atom/language-html

Html does not indent in a newly created file

Opened this issue · 1 comments

@DrunkKiwi commented on Dec 24, 2018, 2:41 PM UTC:

Prerequisites

Description

Okay, so whenever I create a new file via CTRL+N, save it with CTRL+S, a prompt shows asking me to name the file, i name it "whatever.html".. What happens is that in this whatever.html file, when I start to code the tags do not indent themselves.

Ex. instead of being:


<head>
</head>

It renders as:


<head>
     </head>

To solve this, I need to completely exit out of Atom and then get back in it again in the same file and only then it works.

Steps to Reproduce

  1. Create a new file
  2. Save it as [somename].html
  3. Start coding with tags, you'll see that the tags do not indent in the same level.

Expected behavior: [What you expect to happen]
I expect the tags to indent themselves as happens normally as I'm writing code, ex:


<div>
</div>

Actual behavior: [What actually happens]

<div>
     </div>

now i have to go and manually indent the div closing tag in the same level as the div opening tag

Reproduces how often: [What percentage of the time does it reproduce?]
It happens in every case, 100%.

Versions

atom 1.33.1
OS: Windows 10, Enterprise.

Additional Information

I use django sometimes and the django html files never render html normally, it is always buggy. However, this issue doesn't have to have django to be replicated. It happens in pure html files and that's what's driving me crazy:)

This issue was moved by rsese from atom/atom#18619.

rsese commented

Thanks for the report! I can reproduce with 1.33.1 on macOS 10.12.6, Looks like this doesn't reproduce with Tree-sitter disabled though.