@angular/language-server 20.1.0 → 20.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +0 -105
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -217505,75 +217505,6 @@ var require_embedded_support = __commonJS({
217505
217505
  }
217506
217506
  });
217507
217507
 
217508
- // ../../../../../../../../execroot/__main__/bazel-out/darwin_arm64-fastbuild/bin/server/src/semantic_tokens.js
217509
- var require_semantic_tokens = __commonJS({
217510
- "../../../../../../../../execroot/__main__/bazel-out/darwin_arm64-fastbuild/bin/server/src/semantic_tokens.js"(exports2) {
217511
- "use strict";
217512
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
217513
- if (k2 === void 0)
217514
- k2 = k;
217515
- var desc = Object.getOwnPropertyDescriptor(m, k);
217516
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
217517
- desc = { enumerable: true, get: function() {
217518
- return m[k];
217519
- } };
217520
- }
217521
- Object.defineProperty(o, k2, desc);
217522
- } : function(o, m, k, k2) {
217523
- if (k2 === void 0)
217524
- k2 = k;
217525
- o[k2] = m[k];
217526
- });
217527
- var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
217528
- Object.defineProperty(o, "default", { enumerable: true, value: v });
217529
- } : function(o, v) {
217530
- o["default"] = v;
217531
- });
217532
- var __importStar = exports2 && exports2.__importStar || function(mod) {
217533
- if (mod && mod.__esModule)
217534
- return mod;
217535
- var result = {};
217536
- if (mod != null) {
217537
- for (var k in mod)
217538
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
217539
- __createBinding(result, mod, k);
217540
- }
217541
- __setModuleDefault(result, mod);
217542
- return result;
217543
- };
217544
- Object.defineProperty(exports2, "__esModule", { value: true });
217545
- exports2.getSemanticTokens = void 0;
217546
- var lsp = __importStar(require("vscode-languageserver/node"));
217547
- function getSemanticTokens(languageService, classifications, script) {
217548
- const spans = classifications.spans;
217549
- const builder = new lsp.SemanticTokensBuilder();
217550
- for (let i = 0; i < spans.length; ) {
217551
- const offset = spans[i++];
217552
- const length = spans[i++];
217553
- const classification = spans[i++];
217554
- const tokenType = languageService.getTokenTypeFromClassification(classification);
217555
- if (tokenType === void 0) {
217556
- continue;
217557
- }
217558
- const tokenModifiers = languageService.getTokenModifierFromClassification(classification);
217559
- const startPos = script.positionToLineOffset(offset);
217560
- startPos.line -= 1;
217561
- startPos.offset -= 1;
217562
- const endPos = script.positionToLineOffset(offset + length);
217563
- endPos.line -= 1;
217564
- endPos.offset -= 1;
217565
- for (let line = startPos.line; line <= endPos.line; line++) {
217566
- const startCharacter = line === startPos.line ? startPos.offset : 0;
217567
- const endCharacter = line === endPos.line ? endPos.offset : script.lineToTextSpan(line - 1).length;
217568
- builder.push(line, startCharacter, endCharacter - startCharacter, tokenType, tokenModifiers);
217569
- }
217570
- }
217571
- return builder.build();
217572
- }
217573
- exports2.getSemanticTokens = getSemanticTokens;
217574
- }
217575
- });
217576
-
217577
217508
  // ../../../../../../../../execroot/__main__/bazel-out/darwin_arm64-fastbuild/bin/common/initialize.js
217578
217509
  var require_initialize = __commonJS({
217579
217510
  "../../../../../../../../execroot/__main__/bazel-out/darwin_arm64-fastbuild/bin/common/initialize.js"(exports2) {
@@ -217833,7 +217764,6 @@ var require_session = __commonJS({
217833
217764
  var completion_1 = require_completion();
217834
217765
  var diagnostic_1 = require_diagnostic();
217835
217766
  var embedded_support_1 = require_embedded_support();
217836
- var semantic_tokens_1 = require_semantic_tokens();
217837
217767
  var text_render_1 = require_text_render();
217838
217768
  var utils_1 = require_utils();
217839
217769
  var LanguageId;
@@ -217977,30 +217907,6 @@ var require_session = __commonJS({
217977
217907
  conn.onCodeActionResolve((p) => __async(this, null, function* () {
217978
217908
  return yield this.onCodeActionResolve(p);
217979
217909
  }));
217980
- conn.onRequest(lsp.SemanticTokensRequest.type, (p) => this.onSemanticTokensRequest(p));
217981
- conn.onRequest(lsp.SemanticTokensRangeRequest.type, (p) => this.onSemanticTokensRangeRequest(p));
217982
- }
217983
- onSemanticTokensRequest(params) {
217984
- const lsInfo = this.getLSAndScriptInfo(params.textDocument);
217985
- if (lsInfo === null) {
217986
- return null;
217987
- }
217988
- const { languageService, scriptInfo } = lsInfo;
217989
- const span = { start: 0, length: scriptInfo.getSnapshot().getLength() };
217990
- const classifications = languageService.getEncodedSemanticClassifications(scriptInfo.fileName, span, ts.SemanticClassificationFormat.TwentyTwenty);
217991
- return (0, semantic_tokens_1.getSemanticTokens)(languageService, classifications, scriptInfo);
217992
- }
217993
- onSemanticTokensRangeRequest(params) {
217994
- const lsInfo = this.getLSAndScriptInfo(params.textDocument);
217995
- if (lsInfo === null) {
217996
- return null;
217997
- }
217998
- const { languageService, scriptInfo } = lsInfo;
217999
- const start = (0, utils_1.lspPositionToTsPosition)(lsInfo.scriptInfo, params.range.start);
218000
- const end = (0, utils_1.lspPositionToTsPosition)(lsInfo.scriptInfo, params.range.end);
218001
- const span = { start, length: end - start };
218002
- const classifications = languageService.getEncodedSemanticClassifications(scriptInfo.fileName, span, ts.SemanticClassificationFormat.TwentyTwenty);
218003
- return (0, semantic_tokens_1.getSemanticTokens)(languageService, classifications, scriptInfo);
218004
217910
  }
218005
217911
  onCodeAction(params) {
218006
217912
  const filePath = (0, utils_1.uriToFilePath)(params.textDocument.uri);
@@ -218474,17 +218380,6 @@ var require_session = __commonJS({
218474
218380
  // Find more info
218475
218381
  // [here](https://github.com/angular/vscode-ng-language-service/issues/1828)
218476
218382
  codeActionKinds: [lsp.CodeActionKind.QuickFix]
218477
- },
218478
- semanticTokensProvider: {
218479
- documentSelector: null,
218480
- legend: {
218481
- tokenTypes: [
218482
- "class"
218483
- ],
218484
- tokenModifiers: []
218485
- },
218486
- full: true,
218487
- range: true
218488
218383
  }
218489
218384
  },
218490
218385
  serverOptions
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@angular/language-server",
3
3
  "description": "LSP server for Angular Language Service",
4
- "version": "20.1.0",
4
+ "version": "20.1.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/angular/vscode-ng-language-service.git"