21 Commits

Author SHA1 Message Date
Matthieu Riegler d470afa8b2 refactor(platform-server): ensure error boundaries work with ssr/hydration (#70463)
Added some tests to ensure error boundaries work with SSR and hydration.

PR Close #70463
2026-09-09 15:56:05 +02:00
Alex Rickabaugh f4a5650ed9 feat(language-service): add support for @boundary blocks (#70463)
Add support for the new `@boundary` and `@error` control flow blocks in the Angular Language Service.

This includes:
- Updating outlining spans to handle boundary blocks correctly.
- Adding classification visitor methods for semantic tokens.
- Adding template target visitor methods for navigation and hover support.
- Updating the TextMate grammar to recognize `@boundary` and the `when` clause.

PR Close #70463
2026-09-09 15:56:05 +02:00
aparziale 1d9e445d1a fix(vscode-extension): handle escaped delimiters in inline template and styles highlighting
The TextMate grammars for inline templates and inline styles ended the
string at the first occurrence of the delimiter, so an escaped delimiter
(e.g. \`) terminated the highlighting prematurely and the rest of the
template was no longer highlighted as HTML.

Escape sequences are now consumed before delegating to the HTML/CSS
grammars, so escaped delimiters no longer end the string. Also removes
the stray pipes from the string delimiter character class, which
unintentionally matched a literal '|'.

Fixes #65493
2026-09-01 14:40:44 -07:00
Matthieu Riegler 1fa8bb7a99 refactor(vscode-extension): allow toggle attributes via LS.
This change allows to toggle attributes that are on their own line and have a 1+ leading space.

This change doesn't suffer from the issue that was reverted in #68067.

Also this change fixes another regression that messed up highlighting if an attribute value included a '//', like in an href.
2026-04-13 22:10:16 +03:00
Matthieu Riegler e95d84684f fix(vscode-extension): restore correct highlighting
This is a regression introduced by #66891 when trying to support commenting attribute via the language service extension
2026-04-07 14:53:08 -07:00
Matthieu Riegler 8bc31a515f feat(core): Allow other expression for exhaustive typechecking
When the switched expression is nested within a union, exhaustive typechecking needs to know which expression to check.
This change adds the possibility of specifying the expression to check:

```
@Component({
  selector: 'app-root',
  imports: [],
  template: `
    @switch (state.mode) {
      @case ('show') { {{ state.menu }}; }
      @case ('hide') {}
      @default never(state);
    }
  `,
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class App {
  state!: { mode: 'hide' } | { mode: 'show'; menu: number };;
}
```

fixes #67406
2026-03-24 14:42:28 -07:00
Matthieu Riegler e850643b1b feat(compiler): Support comments in html element.
```
      <div
        // comment 0
        /* comment 1 */
        attr1="value1"
        /*
           comment 2
           spanning multiple lines
        */
        attr2="value2"
      ></div>
```
2026-03-19 15:25:17 -07:00
Alan Agius 4febb8ad31 build: update aspect_rules_js to 3.0.2 (#67518)
This updates the major version of `aspect_rules_js`.

PR Close #67518
2026-03-11 13:37:33 -07:00
Matthieu Riegler db11e74b3d refactor(vscode-extension): Add support for exhaustive type check in the syntax
`@default never` will be considered a keyword on its own.
2026-02-24 11:23:47 -08:00
Matthieu Riegler 4f8d3995f0 fix(vscode-extension): Highlight function calls with optional chaining
eg: `foo?.()` should be highlighted as `foo()`.

fixes #65513
2026-02-10 09:42:03 -08:00
Matthieu Riegler 01ed57f297 fix(vscode-extension): support highlighting for class bindings with brackets
Tailwind classes can often be quite complex strings. This change adds supports for classes with backets.

fixes #66818
2026-02-04 15:45:04 -08:00
Kristiyan Kostadinov b95753eb7d fix(vscode-extension): add syntax highlighting for arrow functions
Updates the syntax definition to handle arrow functions. The definition is largely based on TypeScript's own syntax highlighting since it's quite complex.
2026-01-13 11:09:26 -08:00
Kristiyan Kostadinov c70a6a6ecc fix(vscode-extension): add syntax highlighting for spread/rest expressions
Updates the syntax definition to include spread/rest expressions.
2026-01-13 11:09:26 -08:00
Kristiyan Kostadinov f0dba6deb9 build: update license for vscode extension
The vscode extension still has the old license headers pointing pointing to AIO.
2026-01-12 08:17:39 -08:00
Matthieu Riegler 640693da8e feat(compiler): Add support for multiple swich cases matching
consecutive `@case` blocks are now supported:

```ts
@switch (case) {
  @case (0)
  @case (1) {
    case 0 or 1
  }
  @case (2) {
    case 2
  }
  @default {
    default
  }
}
```

fixes #14659
2026-01-07 09:23:50 -05:00
SkyZeroZx 9f5744a92d fix(language-service): avoid interpolation highlighting inside @let
This change omits treating `{{ }}` interpolation syntax as valid inside `@let` binding strings, preventing the interpolation curly braces from superseding the match of the surrounding binding expression and ensuring the highlighter reflects the correct semantics of `@let` bindings.

fixes #61643
2025-12-17 09:39:18 -08:00
Alan Agius 0f55443d9b refactor: exclude tsconfig.json from VSIX package contents (#64991)
The  file is no longer included in the VSCode extension package.
This change updates the golden file and the  file to reflect this exclusion.

PR Close #64991
2025-11-07 11:36:31 -08:00
Andrew Scott 80e00ff4e5 fix(language-service): prevent interpolation from superseding block braces (#64392)
This change omits the injection of the template syntaxes inside any
existing block scope. The injection is not needed because the template
and expression scopes are included explicitly as patterns where
appropriate under the template-blocks definitions.

This change prevents the interpolation curly braces from superseding the
match for the open curly of the block body. This issue also happens with
ICUs (#62697), but those do not have any named scopes to exclude as of
today.

fixes https://github.com/angular/vscode-ng-language-service/issues/1991

PR Close #64392
2025-10-20 17:49:04 +00:00
Alan Agius 9af3cf7b0b build: migrate to in-repo ts_project with strict deps (#64306)
This commit migrates the vscode-ng-language-service to use the in-repo `ts_project` macro, which has strict dependency checking enabled. This improves build-time dependency validation and helps ensure that all dependencies are explicitly declared.

As part of this change, redundant `tsconfig.json` files have been removed in favor of a centralized configuration, and `jasmine_test` rules have been updated to the standard macro. A minor code adjustment in `server/src/session.ts` was also made to improve error handling.

PR Close #64306
2025-10-09 10:00:31 -07:00
Alan Agius fe0e5ab294 build: bump vscode-tmgrammar-test to 0.1.3 (#64078)
Update `vscode-tmgrammar-test`.

PR Close #64078
2025-09-25 10:58:41 -04:00
Joey Perrott 863c7eaafe build: migrate vscode extension into repo (#63924)
Migrate the vscode extension for angular into this repository.

PR Close #63924
2025-09-24 20:24:32 +00:00