Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Tag matching doesn't work in HTML with tree-sitter enabled #355

Closed
1 task done
oueryemchi opened this issue Aug 4, 2018 · 7 comments · Fixed by #367
Closed
1 task done

Tag matching doesn't work in HTML with tree-sitter enabled #355

oueryemchi opened this issue Aug 4, 2018 · 7 comments · Fixed by #367

Comments

@oueryemchi
Copy link

oueryemchi commented Aug 4, 2018

Edit by @rsese to add issue template details

Prerequisites

Description

Bracket matching in HTML doesn't work with tree-sitter enabled.

Steps to Reproduce

  1. Enable tree-sitter Settings > Core > Use Tree Sitter Parsers
  2. Create and save a file test.html with the html snippet content:
<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8">
    <title></title>
  </head>
  <body>

  </body>
</html>
  1. Click in the <body> tag.

Expected behavior: [What you expect to happen]

Expect the <\body> tag to be highlighted.

Actual behavior: [What actually happens]

The <\body> tag isn't highlighted.

Reproduces how often: [What percentage of the time does it reproduce?]

100%

Versions

$ atom-nightly  -v
Atom    : 1.31.0-nightly3
Electron: 2.0.6
Chrome  : 61.0.3163.100
Node    : 8.9.3

macOS 10.12.6

Additional Information

If you disable tree-sitter, the tag matching works.


always worked in all files. after updating Atom and packages 2 days ago (done on 2d of August 2018), Matcher stopped working in plain HTML files.

I disabled all packages and left on the core ones, still not working..

@rsese
Copy link

rsese commented Aug 6, 2018

Thanks for the report - I think this is an issue with tree-sitter, do you have tree-sitter enabled @oueryemchi (Settings > Core > Use Tree Sitter Parsers)?

Also, what version of Atom are you running (atom -v) and what operating system? Please use the issue template, the information in the template is super helpful for us when triaging issues.

@oueryemchi
Copy link
Author

Indeed! you're the man! that was the culprit and you saved the day ;)

Thanks much!

For info sake: I am on Win 10 - 64Bit (updated to latest) and Atom version is 1.29.0

@rsese
Copy link

rsese commented Aug 7, 2018

Going to go ahead and re-open just to confirm this is fixed - /cc @maxbrunsfeld @queerviolet. @maxbrunsfeld we talked about this a bit ago and I think you mentioned this will be fixed and that I should ping you in an issue for the behavior just for tracking?

@rsese rsese reopened this Aug 7, 2018
@rsese rsese changed the title not working in plain HTML files Tag matching doesn't work with tree-sitter enabled Aug 7, 2018
@maxbrunsfeld maxbrunsfeld self-assigned this Oct 25, 2018
@Ben3eeE Ben3eeE changed the title Tag matching doesn't work with tree-sitter enabled Tag matching doesn't work in HTML with tree-sitter enabled Nov 1, 2018
@ahallicks
Copy link

Just to note on this that it works for me in normal HTML documents but not in documents that don't have an opening <html> tag.

We use HTML includes where I work and the includes are just blocks of HTML. With the tree sitting enabled tag matching doesn't work on these includes, but does on any normal HTML document.

This is in Atom v1.33.0-beta1.

@Ben3eeE
Copy link
Contributor

Ben3eeE commented Nov 14, 2018

This is also an issue for jsx.

@maxbrunsfeld
Copy link
Contributor

Ok, sorry about this everyone. The fix will ship in Atom 1.33 and 1.34 beta.

@liquidmetalrob
Copy link

liquidmetalrob commented Nov 22, 2018

I'm having the bizarre problem where one HTML file with <!DOCTYPE html> and <html lang="en"> has tag matching working. So I thought that was all I needed. But even if I make a new file and copy over the contents of the working file it still won't work. If I copy the working file and empty it out it does work though. I don't know why there should be a difference.

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

Successfully merging a pull request may close this issue.

7 participants