Sublime Forum

Is sublim heard about Angular +2?

#1

I have been used sublime 3 years ago with angularjs and react it was my favorite editor, then I moved to Angular 2 and vs code, now I opened sublime and trying to work with Angular +2, I shocked!

I also tried a bunch of plugins and nothing effects

Any ideas?

0 Likes

#2

Sublime Text provides all required infrastructures to support AngularJS and many more.

It just looks like there is nobody interested in maintaining a syntax definition for it. Please note, all packages are community driven.

Syntax Highlighting

That said, JS Custom is the best way to go with supporting React atm.

I wouldn’t recomment installing the TypeScript package anymore. It is bloated, poorly designed and slows down Sublime Text in an unacceptable way. You could try TypeScript Syntax instead.

There is unfortunatelly no extended HTML (Angular).sublime-syntax which highlights the templates in a special way, but at least the default HTML syntax seems not to break by the custom tags. Adding the bunch of rules required to support such templates should not be complicated.

Auto-Completion

… for such kinds of syntaxes is provided by language-servers today. The LSP package is the client package which can be used to adapt all the language-services VS Code can handle as well.

Some community members even started dedicated plugins to automatically setup language services for convinience reasons, such as lsp-json etc.

There is an AngularJS language service at https://github.com/angular/vscode-ng-language-service , which could propably be used with ST as well. Didn’t try that though.

1 Like