Skip to content

Not detecting proper filetype for html file on a django project #585

Closed
@yujinyuz

Description

@yujinyuz

Does this bug happen when you install plugin without vim-polyglot? Yes

Describe the bug:
I have a sample HTML file that should have a filetype of htmldjango but currently it is detected as plain HTML.

{% load static %}
<footer class="footer">
  My sample
</footer>

I ran :autocmd BufWritePost and found that it's calling polyglot#detect#Html()

Calling polyglot#ft#FThtml() kinda fixes the issue

To Reproduce:

  1. Copy the sample and save it as a .html file. It's currently detected as a plain HTML file

This is related to #553 . Opening other HTML files looks fine but those that start with {% load static %} aren't getting detected properly

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions