sublimelsp / LSP-angular

Convenience plugin for Angular Language Service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inline templates/error reporting doesn't work

jpike88 opened this issue · comments

I have an Angular project which our company uses VSCode for.

Just experimenting with Sublime Text seeing if it will work happily for our project, and I get pretty much nowhere. I have installed the LSP for typescript and angular, and yet type awareness doesn't activate for inline templates, nor do any errors display if I remove a declaration from my app module (which would make a specific template tag invalid somewhere else in the project)

Please provide some basic setup instructions, as so far this has been a frustrating experience and subpar to VSCode which works pretty much out of the box with its angular language server plugin.

nor do any errors display if I remove a declaration from my app module

Can you try installing this LSP file watcher and see if that fixes the errors not being displayed ? https://packagecontrol.io/packages/LSP-file-watcher-chokidar

I am getting typescript errors for an unused declarations, but no angular errors. Also still trying to figure out how to use my project's tsconfig.json...

I took a look at this.

I have installed the LSP for typescript and angular, and yet type awareness doesn't activate for inline templates

Does this work in VS Code?
I tied vs code, and I it looks like VS Code extension also does not support inlay template type.

Could you create a mini repository to reproduce the issue and specify the current behavior and your expected behavior.
I would love to help you solve this issue,
but unfortunately cannot dedicate more free time for this, so a if you leave this info above, it would be helpful.

I tied vs code, and I it looks like VS Code extension also does not support inlay template type.

That's not correct, it works perfectly with the vscode extension.

CMD+clicking also takes me to the correct component, if I CMD click the variables on it, it will take me directly to the line of code of the variables too.

https://marketplace.visualstudio.com/items?itemName=Angular.ng-template

When extension is disabled:

Screen Shot 2022-10-12 at 08 40 06

When enabled:

Screen Shot 2022-10-12 at 08 40 57

I will get onto a minimal angular project testing with this soon

Please provide a simple project that reproduces this issue.

commented

Hello,

I have the same problem with all my apps. I just created a new angular project (v16.0.5) and it also does not work, see attached screenshot below

WX20230611-223047

However LSP-Angular works fine in plain HTML files:
WX20230611-223711

Remark: I do not have this problem with VS Code (both inline templates and HTML files)

@pierresh what is the syntax that you’re using for these Angular Component files?

commented

@pierresh what is the syntax that you’re using for these Angular Component files?

The syntax used by Sublime Text for these Angular Component files is Typescript

I have installed ngx-html-syntax in ~/Library/Application\ Support/Sublime\ Text/Packages, if I use it, the HTML is rendered fine but all the typescript code around is displayed white.