The Angular 2+ support Emacs needs
- Syntax highlighting
- Syntactic indentation
- Out-of-the-box lsp-mode support
- typescript-mode integration
- tide integration
- typescript-mode is required for typescript editing support
Install this package with M-x package-install RET ng2-mode
. It will automatically be activated on *.{component|service|pipe|directive|guard|module}.ts
and *.component.html
files, as well as whenever you type M-x ng2-mode
.
If you want lsp-mode integration for your typescript files, add this to ~/.emacs.d/init.el
:
(with-eval-after-load 'typescript-mode (add-hook 'typescript-mode-hook #'lsp))
ng2-mode
- Enable eitherng2-ts-mode
orng2-html-mode
, depending on the buffer's file extensionng2-ts-mode
- Enable Angular 2 TypeScript modeng2-html-mode
- Enable Angular 2 Template mode
If you want to see a function in either mode, feel free to open an issue or a pull request.
GPLv3+