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

Latest version strips highlighting when VS Code is restarted #32

Closed
ryanwellsdotcom opened this issue Dec 28, 2019 · 15 comments
Closed

Comments

@ryanwellsdotcom
Copy link

Version 1.4.0 strips all highlighting for HTML files when VS Code is restarted. The appearance of HTML is plain text. I can disable/enable the extension and the highlighting works again, but each time VS Code is closed and started, colors are stripped again. I've uninstalled other extensions to rule out the possibility of a conflict.

Rolling back to v1.3.1 solves the issue.

@fdinardo
Copy link

fdinardo commented Dec 31, 2019

I can reproduce the problem.

@ghaschel
Copy link
Owner

Thank you for reporting. I will address this issue in a few days, as soon as i get back to my computer and internet.

@heroes-coding
Copy link

I have the same problem, as well. Wasn't sure if it was some other plugin I had enabled that caused it, but disabling other likely culprits doesn't seem to do the trick.

@ghaschel
Copy link
Owner

ghaschel commented Jan 2, 2020

I can't reproduce this on Ubuntu. What are the O.Ses you are currently using, please?

@fdinardo
Copy link

fdinardo commented Jan 2, 2020

I am on archlinux 64bit:

               +                OS: Arch Linux x86_64
               #                
              ###               Kernel Release: 5.4.7-arch1-1
             #####              Uptime: 7:46
             ######             WM: None
            ; #####;            DE: GNOME
           +##.#####            Packages: 1565
          +##########           RAM: 8301 MB / 15918 MB
         #############;         Processor Type: Intel(R) Core(TM) i7-4712HQ CPU @ 2.30GHz
        ###############+        $EDITOR: vim
       #######   #######        Root: 41G / 50G (82%) (ext4)
     .######;     ;###;`".      
    .#######;     ;#####.       
    #########.   .########`     
   ######'           '######    
  ;####                 ####;   
  ##'                     '##   
 #'                         `#  

@heroes-coding
Copy link

Windows 10 / 64

@ghaschel
Copy link
Owner

ghaschel commented Jan 2, 2020

I will try to reproduce tonight on Windows and MacOS.

The only thing that may have caused this issue was the change of main scope name I had to do. It went from text.html.angular to template.ng. Angular language service was overriding this highlighting.

I have a possible workaround for this: implementing on both scopes text.html.angular and template.ng. That would imply in duplicating the output file with one single line of difference between the two and adding an entry to the package.json file

Although that doesn't seem right to me, it may be the only way to do it if it keeps being overrided by Angular Language Service Plugin

@heroes-coding
Copy link

@ghaschel I don't have Angular Language Service Plugin installed.
After some back and forth with the plugins I do have installed, I found that the conflict (for me, not others necessarily) is with angular2-inline

Hope that helps. Thanks for this great plugin!

@ghaschel
Copy link
Owner

ghaschel commented Jan 2, 2020

Installing angular2inline instantaneously stripped all of the highlighting from the html file for me now

@heroes-coding
Copy link

@ghaschel It may be a problem with angular2inline, but that plugin is also quite useful so I hope you can find a workaround!

@ghaschel
Copy link
Owner

ghaschel commented Jan 2, 2020

angular2inline also overrides the scope as template.ng.

My idea of implementing on both scopes (using one as fallback) works. I am publishing 1.5.0 with the bugfix. Let me know if it works for you guys, so that I can re-open this issue.

=]

@heroes-coding
Copy link

Works for me!

@moonseob
Copy link

moonseob commented Jan 3, 2020

I'm on MacOS, have both Angular Language Service and angular2-inline installed, and 1.5.0 works for me!
Thanks!

@fdinardo
Copy link

fdinardo commented Jan 3, 2020

Thanks!
It is working for me too: #32 (comment)

ghaschel added a commit that referenced this issue Jan 14, 2020
tried to fix a bug where highlighting is stripped off the html file when angular2inline or
angular-language-service is installed. Implemented the same highlighting in two scopes, using one as
fallback/default html

attempt to fix #32
@jamieshaw
Copy link

I've just started using the vscode-angular-html (v1.6.0) plugin and running into the bug where syntax highlighting isn't being applied correctly against Angular Language Server. Disable and re-enable works, but is cumbersome.

Any thoughts? 🤔

Code Version: 1.41.1
Commit: 26076a4de974ead31f97692a0d32f90d735645c0
Date: 2019-12-18T14:57:51.166Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Darwin x64 19.3.0

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

6 participants