angular / vscode-ng-language-service

Angular extension for Visual Studio Code
MIT License
781 stars 117 forks source link

Not enabled on JSX/TSX files #2025

Open KyleSmith0905 opened 6 months ago

KyleSmith0905 commented 6 months ago

🐞 bug report

Is this a regression?

Not sure

Description

I often use JSX (Preact) alongside my templating framework. Doing this allowed me to develop components/builders that have great DX. I also use it for many other things, such as customizing markers on Google Maps (since it's 3 lines of code and not attached to my angular project).

So I'm using files with a .tsx extension often. However, this breaks Angular Language Service. I'm not sure if there is a way to add file extensions.

Here is a minimal reproduction: https://stackblitz.com/edit/stackblitz-starters-duifxz?file=src%2Fmain.tsx (I also experience this in the desktop VSCode app).

Bug Type

What does this bug affect

^ What?

Reproduction

Steps to reproduce the behavior:

  1. Go to 'set the file extension of an Angular component to .tsx'

Expected behavior

My React and my Angular code should be highlighted.

Logs

Set Angular Log level to verbose.


Angular server logging is off. Please set 'angular.log' and restart the server.

Screenshots

image

🌍 Your Environment

Angular Version:


Angular CLI: 15.2.0
Node: 18.19.0
Package Manager: pnpm 8.15.5
OS: win32 x64

Angular: undefined
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1502.0
@angular-devkit/core         15.2.0
@angular-devkit/schematics   15.2.0
@schematics/angular          15.2.0

Extension Version:


v17.3.1

VSCode Version:


1.88.1

Operating System:


Microsoft Windows 11 Home
10.0.22631 Build 22631

Extension options:


Anything else relevant?

atscott commented 6 months ago

This might already be fixed by https://github.com/angular/angular/pull/55003/files#diff-c78608405ed7a0f5cdd6df74cfe33f6670f8a5823333f56b6013178e05bf0efa and would be included in the next release. There could be other places that need to be fixed as well.