Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not enabled on JSX/TSX files #2025

Open
1 of 2 tasks
KyleSmith0905 opened this issue Apr 19, 2024 · 1 comment
Open
1 of 2 tasks

Not enabled on JSX/TSX files #2025

KyleSmith0905 opened this issue Apr 19, 2024 · 1 comment
Labels

Comments

@KyleSmith0905
Copy link

🐞 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

  • Angular Language Service VSCode extension
  • Angular Language Service server

^ 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
Copy link
Collaborator

atscott commented Apr 19, 2024

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.

atscott added a commit to atscott/vscode-ng-language-service that referenced this issue Jun 27, 2024
Part of angular#2025 to allow syntaxes to work in tsx files. Other language
features are still not working.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants