AdamNiederer / ng2-mode

Angular Support for Emacs
GNU General Public License v3.0
73 stars 11 forks source link

"ng2-mode tide-mode" does not display compile errors #10

Closed ciukstar closed 5 years ago

ciukstar commented 6 years ago

ng2-mode tide-mode does not display compile errors on save like typescript-mode tide-mode does

ciukstar commented 5 years ago

Can you elaborate on typescript-mode integration and tide integration

tam5 commented 5 years ago

SOLVED

Add this to init (after pulling in tide).

(use-package ng2-mode
  :config (flycheck-add-mode 'typescript-tide 'ng2-ts-mode))
ciukstar commented 5 years ago

This worked for me:

(use-package ng2-mode
  :config 
  (require 'flycheck)
  (require 'tide)
  (flycheck-add-mode 'typescript-tide 'ng2-ts-mode))

Thank you, @tam5

ciukstar commented 5 years ago

Is there a way to do "the same" with ng2-mode / EditorConfig?

(The second reason I will uninstall ng2-mode again is because I don't how to make n2-mode to work with EditorConfig.)

gentunian commented 5 years ago

Is it possible to use ng2-mode and have compile errors shown? I'm using spacemacs and I've installed ng2-mode as additional package and use the above configuration:

   ;; List of additional packages that will be installed without being
   ;; wrapped in a layer. If you need some configuration for these
   ;; packages, then consider creating a layer. You can also put the
   ;; configuration in `dotspacemacs/user-config'.
   dotspacemacs-additional-packages
   '(
     (ng2-mode :config (require 'flycheck) (require 'tide) (flycheck-add-mode 'typescript-tide 'ng2-ts-mode))
     )

Compile errors are only shown when I do: M-x typescript-mode M-x flycheck-mode. Order matters, it won't work invoking flycheck mode first.

Any idea/hint/solution is appreciated :)