Skip to content
This repository has been archived by the owner on Jun 20, 2019. It is now read-only.

Code compleation/errors does not work in IntelliJ in HTML template files #640

Open
Antoniossss opened this issue Sep 21, 2018 · 9 comments

Comments

@Antoniossss
Copy link

I have fresh Dart installation
VM version: 2.1.0-dev.5.0 (Wed Sep 19 19:15:19 2018 +0200) on "windows_x64"
IntelliJ
image
Stagehand 3.1.3

I have created new stagehand project using instructions from https://webdev.dartlang.org/guides/get-started

Now I am in state that application runs ok, and Dart Analysis seems to be working, but (image below)

  1. IDE does not display analisys errors
  2. Autocomplete/code suggestion does not work at all for *ngIf and other basic Angular directives
  3. Material components are not recognized as known elements

so basicly I can state that I have no dart/angular support in template files. Analisys works for dart files.

image

Analysis Server Diagnostics shows as follows
image

But in code completion tab I can see no request beeing made for template file, only for todo_list_component.dart. Looks like IDE configuration issue. How to include html files for autocompletion/analisys ?

@Antoniossss Antoniossss changed the title Code compleation does not work in IntelliJ in template files Code compleation/errors does not work in IntelliJ in HTML template files Sep 21, 2018
@Antoniossss
Copy link
Author

Also when I check analizer web tool, I can see that there are no autocompletion requests made for HTML files just like they are made for autocomplete in dart files.

@MichaelRFairhurst
Copy link
Contributor

I think the angular plugin maybe crashed?

For instance, the lower panel includes an error for 'somefield' in todo_list_component.html. That has to have been supplied by the plugin. Note that since its technically a warning rather than an error (it mirrors dart in this way), it is yellow in the HTML file, which makes it easy to miss.

The remaining chunks of yellow are probably there because you have IntelliJ's HTML diagnostics on. They are on by default, unfortunately, and we've explored ways to automatically turn them off but don't yet have any great ideas on that. You can turn them off from settings -> inspections -> html.

Not sure why autocomplete isn't working, I will look into that further here...

@MichaelRFairhurst
Copy link
Contributor

It looks like the code completion diagnostics page does not track plugin completions, filed here: dart-lang/sdk#34562

What OS are you using?

And did you by chance check the analyzer plugins section of the diagnostic page?

@Antoniossss
Copy link
Author

Antoniossss commented Sep 25, 2018 via email

@MderM
Copy link

MderM commented Oct 23, 2018

I have the exact same issues with WebStorm.

@MderM
Copy link

MderM commented Oct 23, 2018

Plugin page of diagnostic server is showing this after a clean install of dart sdk and cleaning the pub cache and then creating a new project from material components template:

image

@MderM
Copy link

MderM commented Nov 2, 2018

Any news on this one? Tested on Linux too. Plugin is not running (it states: for unknown reason)... sooo, plein not usable from a fresh install of everything. Kind of a bummer

@schnaser
Copy link

schnaser commented Nov 20, 2018

@MderM I have the same issue on OSX, no luck yet - at least I'm not alone I guess?

@alexander-doroshko
Copy link

This should work fine in IntelliJ IDEA / WebStorm 2019.1.3. But you might need to clear Analysis Server caches after enabling 'angular' plugin in the analysis_options.yaml file. It means - delete .dartServer folder (on Windows it's in C:\Users\user_name\AppData\Local.dartServer). Filed #709.

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

No branches or pull requests

5 participants