Oni: @angular/language-service not working with external template (.component.html)

Created on 13 Aug 2018  路  5Comments  路  Source: onivim/oni

Oni Version: 0.3.6
Neovim Version (Linux only):
Operating System: macOS High Sierra

Issue: @angular/language-service is enabled in tsconfig.json, but it doesn't seem to work for template file. (.component.html).

Expected behavior: Autocompletion, syntax checking and linting inside .component.html files.

Actual behavior: Only provides basic HTML autocompletion, and syntax checking.

Steps to reproduce: Clone https://github.com/Ismaestro/angular6-example-app, add

"plugins": [
      { "name": "@angular/language-service" }
    ]

to ts.config.json, open a .component.html file and see the lack of syntax checking and auto completion.

I am hoping I am doing something wrong? I'd really love to use Oni as my main editor for angular development.

question

Most helpful comment

For anyone else, I rewrote the tslint plugin to typescript and I built in support for external angular templates:

screen shot 2018-08-14 at 22 42 49

@bryphe Should I open a pull request at https://github.com/bryphe/oni-plugin-tslint?

All 5 comments

Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.

Hey!

Not sure who else around here is an angular developer, so I'm just going to have to take a guess that since the component file ends with .html, vim and therefore Oni are just seeing it as a HTML file, so the angular server is never started. You'd be able to check that by seeing what language is reported at the bottom in the status bar.

Its also possible we aren't picking up plugins from the tsconfig.json, but I've not checked the code for that yet.

@CrossR The tslint not being picked up is actually a different story, and yes I cna see that the HTML mode is running when looking at a .component.html file. Anything I can edit to force a sort of hybrid Typescript/Web mode in .component.html?

For anyone else, I rewrote the tslint plugin to typescript and I built in support for external angular templates:

screen shot 2018-08-14 at 22 42 49

@bryphe Should I open a pull request at https://github.com/bryphe/oni-plugin-tslint?

@wesselvdv I think a PR would be hugely appreciated 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bryphe picture bryphe  路  3Comments

TalAmuyal picture TalAmuyal  路  3Comments

IvRRimum picture IvRRimum  路  3Comments

Canop picture Canop  路  3Comments

tcoopman picture tcoopman  路  3Comments