Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
yujinyuz opened this issue Oct 13, 2020 · 1 comment
Closed

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

yujinyuz opened this issue Oct 13, 2020 · 1 comment

Comments

@yujinyuz
Copy link

yujinyuz commented Oct 13, 2020

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

@yujinyuz yujinyuz changed the title Not detecting proper filetype for html file Not detecting proper filetype for html file on a django project Oct 13, 2020
@sheerun
Copy link
Owner

sheerun commented Oct 14, 2020

thanks for noticing, it should be fine now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants