Angular Template Syntax Highlighting not Working in IntelliJ after Upgrading to 2019.2.3 (build 192.6817.14)

EDIT: After deleting all of my angular modules' .iml files and recreating the modules from existing sources, everything works again.

Angular syntax highlighting was working fine in IntelliJ 2019.1.3 (build 191.6183.87). After upgrading to version 2019.2.3 (build 192.6817.14), none of the angular bindings and directives are highlighted in templates, and ctrl+click does not take me into the code. When I upgraded I simply allowed IntelliJ to pull my IDE settings from the previous version.

I tried disabling and re-enabling the AngularJS plugin to no avail, and I do wait for indexing to complete.

If I open back up 2019.1.3, it loads my same project that I'm using in 2019.2.3 just fine with the Angular syntax highlighting and code completion working just fine. When I switch back to 2019.2.3, it is still broken.

8 comments
Comment actions Permalink

looks like the Angular support is not enabled. If invalidating caches (File > Invalidate caches, Invalidate and restart) doesn't help, please select your template  .html file in Project tool window and hit F1 ( View | Quick documentation) - what docs are shown? Please provide a screenshot and your idea.log (Help | Show log in ...)

1
Comment actions Permalink

2019-10-17 15:25:00,190 [      0]   INFO -        #com.intellij.idea.Main - ------------------------------------------------------ IDE STARTED ------------------------------------------------------ 

2019-10-17 15:25:00,237 [     47]   INFO -        #com.intellij.idea.Main - JNA library (64-bit) loaded in 28 ms 

2019-10-17 15:25:00,278 [     88]   INFO -        #com.intellij.idea.Main - IDE: IntelliJ IDEA (build #IU-192.6817.14, 23 Sep 2019 22:43) 

2019-10-17 15:25:00,278 [     88]   INFO -        #com.intellij.idea.Main - OS: Linux (4.15.0-65-generic, amd64) 

2019-10-17 15:25:00,278 [     88]   INFO -        #com.intellij.idea.Main - JRE: 11.0.4+10-b304.69 (JetBrains s.r.o) 

2019-10-17 15:25:00,278 [     88]   INFO -        #com.intellij.idea.Main - JVM: 11.0.4+10-b304.69 (OpenJDK 64-Bit Server VM) 

2019-10-17 15:25:00,279 [     89]   INFO -        #com.intellij.idea.Main - JVM Args: -Xms128m -Xmx3072m -XX:ReservedCodeCacheSize=240m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -Djdk.http.auth.tunneling.disabledSchemes="" -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Dawt.useSystemAAFontSettings=lcd -Dsun.java2d.renderer=sun.java2d.marlin.MarlinRenderingEngine -XX:ErrorFile=/home/<REDACTED>/java_error_in_IDEA_%p.log -XX:HeapDumpPath=/home/<REDACTED>/java_error_in_IDEA.hprof -Didea.paths.selector=IntelliJIdea2019.2 -Djb.vmOptionsFile=/home/<REDACTED>/.IntelliJIdea2019.2/config/idea64.vmoptions -Didea.jre.check=true 

2019-10-17 15:25:00,279 [     89]   INFO -        #com.intellij.idea.Main - charsets: JNU=UTF-8 file=UTF-8 

2019-10-17 15:25:01,055 [    865]   INFO - llij.ide.plugins.PluginManager - Cannot find optional descriptor profiler-java-gradle.xml 

2019-10-17 15:25:01,515 [   1325]   INFO - tellij.diagnostic.LoadingPhase - Reached SPLASH loading phase 

2019-10-17 15:25:01,519 [   1329]   INFO - plication.impl.ApplicationImpl - CPU cores: 8; ForkJoinPool.commonPool: java.util.concurrent.ForkJoinPool@1aff1837[Running, parallelism = 7, size = 0, active = 0, running = 0, steals = 0, tasks = 0, submissions = 0]; factory: com.intellij.concurrency.IdeaForkJoinWorkerThreadFactory@1f725bc6 

2019-10-17 15:25:01,584 [   1394]   INFO - .intellij.idea.IdeaApplication - WM detected: GNOME Shell 

2019-10-17 15:25:01,602 [   1412]   INFO - llij.ide.plugins.PluginManager - Cannot find optional descriptor profiler-java-gradle.xml 

2019-10-17 15:25:01,821 [   1631]   INFO - llij.ide.plugins.PluginManager - Loaded bundled plugins: ASP (192.6817.14), Angular and AngularJS (192.6817.14), Ant (192.6817.14), Application Servers View (192.6817.14), Arquillian (192.6817.14), AspectJ (192.6817.14), Bytecode Viewer (192.6817.14), CFML (192.6817.14), CSS (192.6817.14), ChangeReminder (192.6817.14), Cloud Foundry (192.6817.14), CoffeeScript (192.6817.14), Configuration Script (192.6817.14), Copyright (192.6817.14), Coverage (192.6817.14), Database Tools and SQL (192.6817.14), Dependency Structure Matrix (192.6817.14), Docker (192.6817.14), Drools (192.6817.14), Eclipse Interoperability (192.6817.14), EditorConfig (192.6817.14), Emma (192.6817.14), Flash/Flex (192.6817.14), FreeMarker (192.6817.14), GWT (192.6817.14), Geronimo Integration (192.6817.14), Gherkin (192.6817.14), Git (192.6817.14), GitHub (192.6817.14), GlassFish (192.6817.14), Google App Engine (192.6817.14), Gradle (192.6817.14), Gradle Integration Extension (192.6817.14), Gradle-Maven (192.6817.14), Grails (192.6817.14), Groovy (192.6817.14), Guice (192.6817.14), HTML Tools (192.6817.14), HTTP Client (192.6817.14), Haml (192.6817.14), Heroku (192.6817.14), Hibernate (192.6817.14), IDE Settings Sync (192.6817.14), IDEA CORE (192.6817.14), IntelliLang (192.6817.14), JBoss Frameworks Base (192.6817.14), JBoss Seam (192.6817.14), JBoss Seam Pageflow (192.6817.14), JBoss Seam Pages (192.6817.14), JBoss jBPM (192.6817.14), JSR45 (192.6817.14), JUnit (192.6817.14), Java (192.6817.14), Java Bytecode Decompiler (192.6817.14), Java EE: Batch Applications (192.6817.14), Java EE: Bean Validation (192.6817.14), Java EE: Contexts and Dependency Injection (192.6817.14), Java EE: EJB, JPA, Servlets (192.6817.14), Java EE: JMS, JSON Processing, Concurrency, Transaction  (192.6817.14), Java EE: Java Server Faces (192.6817.14), Java EE: RESTful Web Services (JAX-RS) (192.6817.14), Java EE: Web Services (JAX-WS) (192.6817.14), Java EE: WebSockets (192.6817.14), Java IDE Customization (192.6817.14), Java Internationalization (192.6817.14), Java Server Pages (JSP) (192.6817.14), Java Stream Debugger (192.6817.14), JavaFX (192.6817.14), JavaScript Debugger (192.6817.14), JavaScript Intention Power Pack (192.6817.14), JavaScript and TypeScript (192.6817.14), Jetty Integration (192.6817.14), Kotlin (1.3.41-release-IJ2019.2-1), Less (192.6817.14), Machine Learning Code Completion (192.6817.14), Markdown (192.6817.14), Maven (192.6817.14), Maven Integration Extension (192.6817.14), Mercurial (192.6817.14), NodeJS (192.6817.14), OSGi (192.6817.14), OpenShift integration (192.6817.14), Perforce (192.6817.14), Performance Testing (192.6817.14), Persistence Frameworks Support (192.6817.14), Play Framework (192.6817.14), Plugin DevKit (192.6817.14), Properties (192.6817.14), Reactor (192.6817.14), Refactor-X (192.6817.14), Remote Hosts Access (192.6817.14), Resin Integration (192.6817.14), SSH Remote Run (192.6817.14), Sass (192.6817.14), Settings Repository (192.6817.14), Shell Script (192.6817.14), Smali Support (192.6817.14), Spring AOP/@AspectJ (192.6817.14), Spring Batch (192.6817.14), Spring Boot (192.6817.14), Spring Data (192.6817.14), Spring Integration Patterns (192.6817.14), Spring MVC (192.6817.14), Spring OSGi (192.6817.14), Spring Security (192.6817.14), Spring Support (192.6817.14), Spring Web Flow (192.6817.14), Spring Web Services (192.6817.14), Spring WebSocket (192.6817.14), Spy-js (192.6817.14), Struts 2 (192.6817.14), Stylus (192.6817.14), Subversion (192.6817.14), Tapestry (192.6817.14), Task Management (192.6817.14), Terminal (192.6817.14), TestNG (192.6817.14), TextMate bundles (192.6817.14), Thymeleaf (192.6817.14), Time Tracking (192.6817.14), Tomcat and TomEE Integration (192.6817.14), UI Designer (192.6817.14), UML (192.6817.14), Vaadin (192.6817.14), Velocity (192.6817.14), Virgo/dmServer (192.6817.14), W3C Validators (192.6817.14), WebLogic Integration (192.6817.14), WebSphere Integration (192.6817.14), WildFly (192.6817.14), XPathView + XSLT (192.6817.14), XSLT Debugger (192.6817.14), YAML (192.6817.14), ZKM-Unscramble (192.6817.14), tslint (192.6817.14) 

2019-10-17 15:25:01,821 [   1631]   INFO - llij.ide.plugins.PluginManager - Loaded custom plugins: Add to gitignore (0.3), BashSupport (1.7.13.192), Builder Generator (1.1.7), CSV Plugin (2.8.0-192), Close Editor Tabs Left Right (1.1.1), Dark Purple Theme (1.1), Eclipser (0.7.1), IDEA Restart (1.0), IvyIDEA (1.0.14), Karma (192.6262.9), Open in terminal (1.5.1), Rainbow CSV (1.2), SonarLint (4.2.0.3434), String Manipulation (7.2.182.000.3), Wallaby (1.0.143) 

2019-10-17 15:25:01,821 [   1631]   INFO - llij.ide.plugins.PluginManager - Disabled plugins: Android Support (10.3.4), Cucumber for Groovy (192.6817.14), Cucumber for Java (192.6817.14) 

2019-10-17 15:25:02,191 [   2001]   INFO - cloudConfig.CloudConfigManager - === Start: JBA_NOT_CONNECTED === 

2019-10-17 15:25:02,221 [   2031]   INFO - tellij.diagnostic.LoadingPhase - Reached CONFIGURATION_STORE_INITIALIZED loading phase 

2019-10-17 15:25:02,282 [   2092]   INFO - pi.util.registry.RegistryState - Registry values changed by user: 

2019-10-17 15:25:02,282 [   2092]   INFO - pi.util.registry.RegistryState -   documentation.show.toolbar = true 

2019-10-17 15:25:02,283 [   2093]   INFO - pi.util.registry.RegistryState -   ide.tooltip.initialDelay = 396 

2019-10-17 15:25:02,283 [   2093]   INFO - pi.util.registry.RegistryState -   terminal.buffer.max.lines.count = 99999 

2019-10-17 15:25:02,311 [   2121]   INFO - pi.util.registry.RegistryState - Experimental features enabled for user: inline.browse.button, linux.native.menu, recent.and.edited.files.together, show.create.new.element.in.popup, new.large.text.file.viewer, property.value.inplace.editing 

2019-10-17 15:25:02,335 [   2145]   INFO - ellij.util.io.PagedFileStorage - lower=100; upper=500; buffer=10; max=2985 

2019-10-17 15:25:02,490 [   2300]   INFO - pl.local.NativeFileWatcherImpl - Starting file watcher: /opt/IntelliJ/idea-IU-192.6817.14/bin/fsnotifier64 

2019-10-17 15:25:02,513 [   2323]   INFO - pl.local.NativeFileWatcherImpl - Native file watcher is operational. 

2019-10-17 15:25:02,897 [   2707]   INFO - com.intellij.ide.ui.UISettings - Loaded: fontSize=11, fontScale=1.0; restored: fontSize=11, fontScale=1.0 

2019-10-17 15:25:03,449 [   3259]   INFO - til.net.ssl.CertificateManager - Default SSL context initialized 

2019-10-17 15:25:03,468 [   3278]   INFO - tellij.ide.SystemHealthMonitor - restored ignored PIPE handler 

2019-10-17 15:25:03,469 [   3279]   INFO - rains.ide.BuiltInServerManager - built-in server started, port 63342 

2019-10-17 15:25:03,638 [   3448]   INFO - ngmanip.MyApplicationComponent - Registering Switch case (camelCase, kebab-case, KEBAB-UPPERCASE, snake_case, SCREAMING_SNAKE_CASE, dot.case, words lowercase, First word capitalized, Words Capitalized, PascalCase) id:StringManipulation.SwitchStyleAction 

2019-10-17 15:25:03,665 [   3475]   INFO - il.indexing.FileBasedIndexImpl - File index extensions iterated:112 

2019-10-17 15:25:03,884 [   3694]   INFO - j.ide.ui.OptionsTopHitProvider - 13 ms spent to cache options in application 

2019-10-17 15:25:04,003 [   3813]   INFO - tellij.diagnostic.LoadingPhase - Reached FRAME_SHOWN loading phase 

2019-10-17 15:25:04,379 [   4189]   INFO - penapi.wm.impl.GlobalMenuLinux - Closed dbus-service 'com.canonical.AppMenu.Registrar' 

2019-10-17 15:25:04,517 [   4327]   INFO - pl$FileIndexDataInitialization - Initialization done:963 

2019-10-17 15:25:04,584 [   4394]   INFO - penapi.wm.impl.GlobalMenuLinux - created instance of GlobalMenuLinux for xid=0x2e00026 

2019-10-17 15:25:04,631 [   4441]   INFO - exImpl$StubIndexInitialization - Initialization done:114 

2019-10-17 15:25:05,575 [   5385]   INFO - pl.projectlevelman.NewMappings - VCS Root: [Git] - [/home/<REDACTED>/workspace/angular-ui] 

2019-10-17 15:25:05,982 [   5792]   INFO - com.intellij.ide.ui.UISettings - Loaded: fontSize=12, fontScale=1.0; restored: fontSize=12, fontScale=1.0 

2019-10-17 15:25:05,984 [   5794]   INFO - com.intellij.ide.ui.UISettings - Loaded: fontSize=15, fontScale=1.0; restored: fontSize=15, fontScale=1.0 

2019-10-17 15:25:05,994 [   5804]   WARN - s.impl.EditorColorsManagerImpl - Cannot find scheme: VibrantInk from plugin: com.intellij.database 

2019-10-17 15:25:05,995 [   5805]   WARN - s.impl.EditorColorsManagerImpl - Cannot find scheme: WarmNeon from plugin: com.intellij.database 

2019-10-17 15:25:05,995 [   5805]   WARN - s.impl.EditorColorsManagerImpl - Cannot find scheme: High сontrast from plugin: com.intellij.database 

2019-10-17 15:25:06,009 [   5819]   INFO - com.intellij.ide.ui.UISettings - Loaded: fontSize=13, fontScale=1.0; restored: fontSize=13, fontScale=1.0 

2019-10-17 15:25:06,193 [   6003]   INFO - CompilerWorkspaceConfiguration - Available processors: 8 

2019-10-17 15:25:08,889 [   8699]   INFO - j.ide.script.IdeStartupScripts - 0 startup script(s) found 

2019-10-17 15:25:10,002 [   9812]   INFO -              PerformancePlugin - Performance Plugin is in silent mode 

2019-10-17 15:25:10,242 [  10052]   INFO - llij.database.util.SqlDialects - SQL dialects initialized in 18 ms 

2019-10-17 15:25:10,254 [  10064]   INFO - .diagnostic.PerformanceWatcher - Pushing JS language level to 2 libraries  took 21ms; general responsiveness: ok; EDT responsiveness: ok 

2019-10-17 15:25:10,497 [  10307]   INFO - rationStore.ComponentStoreImpl - Registering unknown macros a.b.c in component DatabaseSettings 

2019-10-17 15:25:12,197 [  12007]   INFO - ge.ExternalProjectsDataStorage - Load external projects data in 14 millis (read time: 2) 

2019-10-17 15:25:12,359 [  12169]   INFO - j.ide.ui.OptionsTopHitProvider - 960 ms spent to cache options in project 

2019-10-17 15:25:12,550 [  12360]   WARN - com.intellij.util.xmlb.Binding - no accessors for class org.jetbrains.kotlin.idea.highlighter.KotlinDefaultHighlightingSettingsProvider 

2019-10-17 15:25:12,705 [  12515]   INFO - .diagnostic.PerformanceWatcher - Pushing properties took 2493ms; general responsiveness: ok; EDT responsiveness: 1/3 sluggish 

2019-10-17 15:25:13,447 [  13257]   INFO - .diagnostic.PerformanceWatcher - Post-startup activities under progress took 3333ms; general responsiveness: ok; EDT responsiveness: 1/4 sluggish 

2019-10-17 15:25:13,453 [  13263]   INFO - cloudConfig.CloudConfigManager - === Start.updateInitStatus === 

2019-10-17 15:25:13,462 [  13272]   INFO - cloudConfig.CloudConfigManager - === StatusBar.update create === 

2019-10-17 15:25:13,462 [  13272]   INFO - cloudConfig.CloudConfigManager - === calculateInitStatus === 

2019-10-17 15:25:13,957 [  13767]   INFO - Json.PackageJsonUpdateNotifier - processPackageJsonFiles [file:///home/<REDACTED>/workspace/angular-ui/package.json] 

2019-10-17 15:25:14,198 [  14008]   INFO - .cloudConfig.CloudConfigClient - === Get cloud config URL: https://cloudconfig.jetbrains.com/cloudconfig/files === 

2019-10-17 15:25:14,250 [  14060]   INFO - tartup.impl.StartupManagerImpl - /home/<REDACTED>/workspace/.idea case-sensitivity: expected=true actual=true 

2019-10-17 15:25:14,308 [  14118]   INFO -  #git4idea.commands.GitHandler - [.] git version 

2019-10-17 15:25:14,332 [  14142]   INFO -  #git4idea.commands.GitHandler - git version 2.17.1 

2019-10-17 15:25:14,354 [  14164]   INFO - ea.config.GitExecutableManager - Git version for /usr/bin/git : 2.17.1 

2019-10-17 15:25:14,469 [  14279]   INFO - tellij.diagnostic.LoadingPhase - Reached PROJECT_OPENED loading phase 

2019-10-17 15:25:14,736 [  14546]   INFO - cloudConfig.CloudConfigManager - === calculateInitStatus.value: JBA_NOT_CONNECTED === 

2019-10-17 15:25:15,054 [  14864]   INFO - tor.impl.FileEditorManagerImpl - Project opening took 9997 ms 

2019-10-17 15:25:15,248 [  15058]   INFO - cloudConfig.CloudConfigManager - === End.updateInitStatus === 

2019-10-17 15:25:17,649 [  17459]   INFO - .diagnostic.PerformanceWatcher - Indexable file iteration took 4942ms; general responsiveness: ok; EDT responsiveness: ok 

2019-10-17 15:25:17,650 [  17460]   INFO - indexing.UnindexedFilesUpdater - Unindexed files update started: 13 files to update 

2019-10-17 15:25:19,123 [  18933]   INFO - .diagnostic.PerformanceWatcher - Unindexed files update took 1473ms; general responsiveness: ok; EDT responsiveness: ok 

2019-10-17 15:25:19,125 [  18935]   INFO - tellij.diagnostic.LoadingPhase - Reached INDEXING_FINISHED loading phase 

2019-10-17 15:25:19,144 [  18954]   INFO - cloudConfig.CloudConfigManager - === StatusBar.start another widget: com.intellij.cloudConfig.StatusBarInfoManager$InfoComponent@59c44c47 === 

2019-10-17 15:25:19,474 [  19284]   INFO - ings.impl.UpdateCheckerService - channel: release 

2019-10-17 15:25:21,307 [  21117]   INFO - ntellij.analysis.SonarLintTask - Running SonarLint Analysis for 'map.component.html' 

2019-10-17 15:25:22,396 [  22206]   INFO - ntellij.analysis.SonarLintTask - SonarLint analysis done 

2019-10-17 15:25:23,306 [  23116]   INFO - rationStore.ComponentStoreImpl - Saving Project '/home/<REDACTED>/workspace' workspaceRunManager took 39 ms 

2019-10-17 15:25:23,456 [  23266]   INFO - mponents.impl.stores.StoreUtil - saveProjectsAndApp took 631 ms 

2019-10-17 15:25:23,697 [  23507]   INFO - tellij.xml.Html5SchemaProvider - HTML5_SCHEMA_LOCATION = com.intellij.openapi.util.AtomicNotNullLazyValue$1@1f49c09 

When I hit F1 with my angular template file selected in the Project pane, this page https://www.jetbrains.com/help/idea/2019.2/project-tool-window.html?utm_campaign=IU&utm_medium=link&utm_source=product&utm_content=2019.2 opens.

When I select View | Quick Documentation I get this:
 

0
Comment actions Permalink

Screenshot shows that your .html files are not treated as Angular templates, i.e. Angular support is not enabled for your project.

please make sure that @angular/core directory is indexed (not shown as excluded in the Project tool window): please expand the node_modules node there and take a screenshot so that I can see what the modules folders look like

0
Comment actions Permalink

Making sure @angular/core was indexed was one of the first things I did.

0
Comment actions Permalink

the structure looks strange - as if each of modules is added as a separate content root.

Can you share a project the issue can be reproduced with? You can delete all your .ts/.html files, leaving the configuration stuff (.idea folder, .iml files, package.json, angular.json, etc.) and folders structure only

0
Comment actions Permalink

I noticed that in 2019.1.3 (the working version) that under Settings > Editor > File Types, the  `Angular HTML Template` has a registered pattern of "Angular HTML Template", which isn't even a valid syntactical pattern as far as I can tell, but it works.

In 2019.2.3 (the broken version), there are no patterns registered. I did manually register `*.component.html` and the syntax highlighting did enable in my angular templates, but it was not properly linking the variables and functions to the component, so it displayed the angular bindings, interpolation, and directives in red and they do not link to the relevant place in code.

0
Comment actions Permalink

After deleting all of my angular modules' .iml files and recreating the modules from existing sources, everything works again.

0
Comment actions Permalink

in my case - errors in package json prevented highlighting in code. After errors was fixed - reindex was started again and all worked after that

0

Please sign in to leave a comment.