This commit is contained in:
parent
ca94a84072
commit
c1bb2a4d3b
|
@ -24,15 +24,25 @@
|
|||
};
|
||||
languages.language = [
|
||||
{
|
||||
name = "html";
|
||||
language-server = { command = "html-languageserver"; };
|
||||
formatter = {
|
||||
command = "prettier";
|
||||
args = [ "--parser" "html" ];
|
||||
name = "angular-html";
|
||||
scope = "text.angular";
|
||||
roots = [ "angular.json" ];
|
||||
grammar = "html";
|
||||
language-server = {
|
||||
command = "ngserver";
|
||||
args = [
|
||||
"--stdio"
|
||||
"--tsProbeLocations"
|
||||
"$(npm -g root)"
|
||||
"--ngProbeLocations"
|
||||
"$(npm -g root)"
|
||||
];
|
||||
};
|
||||
file-types = [ "html" "component.html"];
|
||||
}
|
||||
{
|
||||
name = "typescript";
|
||||
auto-format = true;
|
||||
formatter = {
|
||||
command = "prettier";
|
||||
args = [ "--parser" "typescript" ];
|
||||
|
|
1
home.nix
1
home.nix
|
@ -34,7 +34,6 @@ in
|
|||
enable = true;
|
||||
ytdl-format = "bestvideo[height<=?720]+bestaudio/best";
|
||||
save-position-on-quit = true;
|
||||
scripts = with pkgs.mpvScripts; [ mpris sponsorblock uosc ];
|
||||
};
|
||||
programs.yt-dlp = {
|
||||
enable = true;
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"name": "nixos",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"node_modules/@angular/language-service": {
|
||||
"version": "16.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@angular/language-service/-/language-service-16.1.1.tgz",
|
||||
"integrity": "sha512-3ZifAA15eV9TIHHdNuOBDYQRTA9HGqh1EIYe8JgkRDm9ImlIG7l747VuFs4SoBeTlEBlwyjAIt/47aYHx0R+wg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^16.14.0 || >=18.10.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
/**
|
||||
* @module
|
||||
* @description
|
||||
* Entry point for all public APIs of the language service package.
|
||||
*/
|
||||
import ts from 'typescript';
|
||||
export interface PluginConfig {
|
||||
/**
|
||||
* If true, return only Angular results. Otherwise, return Angular + TypeScript
|
||||
* results.
|
||||
*/
|
||||
angularOnly: boolean;
|
||||
/**
|
||||
* If true, enable `strictTemplates` in Angular compiler options regardless
|
||||
* of its value in tsconfig.json.
|
||||
*/
|
||||
forceStrictTemplates?: true;
|
||||
}
|
||||
export type GetTcbResponse = {
|
||||
/**
|
||||
* The filename of the SourceFile this typecheck block belongs to.
|
||||
* The filename is entirely opaque and unstable, useful only for debugging
|
||||
* purposes.
|
||||
*/
|
||||
fileName: string;
|
||||
/** The content of the SourceFile this typecheck block belongs to. */
|
||||
content: string;
|
||||
/**
|
||||
* Spans over node(s) in the typecheck block corresponding to the
|
||||
* TS code generated for template node under the current cursor position.
|
||||
*
|
||||
* When the cursor position is over a source for which there is no generated
|
||||
* code, `selections` is empty.
|
||||
*/
|
||||
selections: ts.TextSpan[];
|
||||
};
|
||||
export type GetComponentLocationsForTemplateResponse = ts.DocumentSpan[];
|
||||
export type GetTemplateLocationForComponentResponse = ts.DocumentSpan | undefined;
|
||||
/**
|
||||
* `NgLanguageService` describes an instance of an Angular language service,
|
||||
* whose API surface is a strict superset of TypeScript's language service.
|
||||
*/
|
||||
export interface NgLanguageService extends ts.LanguageService {
|
||||
getTcb(fileName: string, position: number): GetTcbResponse | undefined;
|
||||
getComponentLocationsForTemplate(fileName: string): GetComponentLocationsForTemplateResponse;
|
||||
getTemplateLocationForComponent(fileName: string, position: number): GetTemplateLocationForComponentResponse;
|
||||
}
|
||||
export declare function isNgLanguageService(ls: ts.LanguageService | NgLanguageService): ls is NgLanguageService;
|
|
@ -0,0 +1,35 @@
|
|||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// bazel-out/darwin_arm64-fastbuild/bin/packages/language-service/api.mjs
|
||||
var api_exports = {};
|
||||
__export(api_exports, {
|
||||
isNgLanguageService: () => isNgLanguageService
|
||||
});
|
||||
module.exports = __toCommonJS(api_exports);
|
||||
function isNgLanguageService(ls) {
|
||||
return "getTcb" in ls;
|
||||
}
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
//# sourceMappingURL=api_bundle.js.map
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"version": 3,
|
||||
"sources": ["../../../../../packages/language-service/api.ts"],
|
||||
"sourcesContent": ["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the language service package.\n */\n\nimport ts from 'typescript';\n\nexport interface PluginConfig {\n /**\n * If true, return only Angular results. Otherwise, return Angular + TypeScript\n * results.\n */\n angularOnly: boolean;\n /**\n * If true, enable `strictTemplates` in Angular compiler options regardless\n * of its value in tsconfig.json.\n */\n forceStrictTemplates?: true;\n}\n\nexport type GetTcbResponse = {\n /**\n * The filename of the SourceFile this typecheck block belongs to.\n * The filename is entirely opaque and unstable, useful only for debugging\n * purposes.\n */\n fileName: string,\n /** The content of the SourceFile this typecheck block belongs to. */\n content: string,\n /**\n * Spans over node(s) in the typecheck block corresponding to the\n * TS code generated for template node under the current cursor position.\n *\n * When the cursor position is over a source for which there is no generated\n * code, `selections` is empty.\n */\n selections: ts.TextSpan[],\n};\n\nexport type GetComponentLocationsForTemplateResponse = ts.DocumentSpan[];\nexport type GetTemplateLocationForComponentResponse = ts.DocumentSpan|undefined;\n\n/**\n * `NgLanguageService` describes an instance of an Angular language service,\n * whose API surface is a strict superset of TypeScript's language service.\n */\nexport interface NgLanguageService extends ts.LanguageService {\n getTcb(fileName: string, position: number): GetTcbResponse|undefined;\n getComponentLocationsForTemplate(fileName: string): GetComponentLocationsForTemplateResponse;\n getTemplateLocationForComponent(fileName: string, position: number):\n GetTemplateLocationForComponentResponse;\n}\n\nexport function isNgLanguageService(ls: ts.LanguageService|\n NgLanguageService): ls is NgLanguageService {\n return 'getTcb' in ls;\n}\n"],
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;;;;;AA8DM,SAAU,oBAAoB,IACiB;AACnD,SAAO,YAAY;AACrB;",
|
||||
"names": []
|
||||
}
|
49552
node_modules/@angular/language-service/bundles/language-service.js
generated
vendored
Executable file
49552
node_modules/@angular/language-service/bundles/language-service.js
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,49 @@
|
|||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// bazel-out/darwin_arm64-fastbuild/bin/packages/language-service/plugin-factory.mjs
|
||||
var plugin_factory_exports = {};
|
||||
__export(plugin_factory_exports, {
|
||||
factory: () => factory
|
||||
});
|
||||
module.exports = __toCommonJS(plugin_factory_exports);
|
||||
var factory = (tsModule) => {
|
||||
let plugin;
|
||||
return {
|
||||
create(info) {
|
||||
plugin = require("./bundles/language-service.js")(tsModule);
|
||||
return plugin.create(info);
|
||||
},
|
||||
getExternalFiles(project) {
|
||||
var _a, _b;
|
||||
return (_b = (_a = plugin == null ? void 0 : plugin.getExternalFiles) == null ? void 0 : _a.call(plugin, project)) != null ? _b : [];
|
||||
},
|
||||
onConfigurationChanged(config) {
|
||||
var _a;
|
||||
(_a = plugin == null ? void 0 : plugin.onConfigurationChanged) == null ? void 0 : _a.call(plugin, config);
|
||||
}
|
||||
};
|
||||
};
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
//# sourceMappingURL=factory_bundle.js.map
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"version": 3,
|
||||
"sources": ["../../../../../packages/language-service/plugin-factory.ts"],
|
||||
"sourcesContent": ["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport ts from 'typescript/lib/tsserverlibrary';\n\nimport {NgLanguageService, PluginConfig} from './api';\n\ninterface PluginModule extends ts.server.PluginModule {\n create(createInfo: ts.server.PluginCreateInfo): NgLanguageService;\n onConfigurationChanged?(config: PluginConfig): void;\n}\n\nexport const factory: ts.server.PluginModuleFactory = (tsModule): PluginModule => {\n let plugin: PluginModule;\n\n return {\n create(info: ts.server.PluginCreateInfo): NgLanguageService {\n plugin = require(`./bundles/language-service.js`)(tsModule);\n return plugin.create(info);\n },\n getExternalFiles(project: ts.server.Project): string[] {\n return plugin?.getExternalFiles?.(project) ?? [];\n },\n onConfigurationChanged(config: PluginConfig): void {\n plugin?.onConfigurationChanged?.(config);\n },\n };\n};\n"],
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;;;;;AAiBO,IAAM,UAAyC,CAAC,aAA0B;AAC/E,MAAI;AAEJ,SAAO;IACL,OAAO,MAAgC;AACrC,eAAS,QAAQ,iCAAiC,QAAQ;AAC1D,aAAO,OAAO,OAAO,IAAI;IAC3B;IACA,iBAAiB,SAA0B;AAzB/C;AA0BM,cAAO,4CAAQ,qBAAR,gCAA2B,aAA3B,YAAuC,CAAA;IAChD;IACA,uBAAuB,QAAoB;AA5B/C;AA6BM,6CAAQ,2BAAR,gCAAiC;IACnC;;AAEJ;",
|
||||
"names": []
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {factory} from './plugin-factory';
|
||||
|
||||
// Tsserver expects `@angular/language-service` to provide a factory function
|
||||
// as the default export of the package.
|
||||
export = factory;
|
|
@ -0,0 +1,13 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
const {factory} = require('./factory_bundle');
|
||||
|
||||
// Tsserver expects `@angular/language-service` to provide a factory function
|
||||
// as the default export of the package.
|
||||
module.exports = factory;
|
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
"name": "@angular/language-service",
|
||||
"version": "16.1.1",
|
||||
"description": "Angular - language services",
|
||||
"main": "./index.js",
|
||||
"typings": "./index.d.ts",
|
||||
"author": "angular",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "^16.14.0 || >=18.10.0"
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./index.d.ts",
|
||||
"default": "./index.js"
|
||||
},
|
||||
"./package.json": {
|
||||
"default": "./package.json"
|
||||
},
|
||||
"./api": {
|
||||
"types": "./api.d.ts",
|
||||
"default": "./api_bundle.js"
|
||||
}
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/angular/angular.git",
|
||||
"directory": "packages/language-service"
|
||||
},
|
||||
"ng-update": {
|
||||
"packageGroup": [
|
||||
"@angular/core",
|
||||
"@angular/bazel",
|
||||
"@angular/common",
|
||||
"@angular/compiler",
|
||||
"@angular/compiler-cli",
|
||||
"@angular/animations",
|
||||
"@angular/elements",
|
||||
"@angular/platform-browser",
|
||||
"@angular/platform-browser-dynamic",
|
||||
"@angular/forms",
|
||||
"@angular/platform-server",
|
||||
"@angular/upgrade",
|
||||
"@angular/router",
|
||||
"@angular/language-service",
|
||||
"@angular/localize",
|
||||
"@angular/service-worker"
|
||||
]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
import ts from 'typescript/lib/tsserverlibrary';
|
||||
export declare const factory: ts.server.PluginModuleFactory;
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"name": "nixos",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"devDependencies": {
|
||||
"@angular/language-service": "^16.1.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@angular/language-service": {
|
||||
"version": "16.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@angular/language-service/-/language-service-16.1.1.tgz",
|
||||
"integrity": "sha512-3ZifAA15eV9TIHHdNuOBDYQRTA9HGqh1EIYe8JgkRDm9ImlIG7l747VuFs4SoBeTlEBlwyjAIt/47aYHx0R+wg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^16.14.0 || >=18.10.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"devDependencies": {
|
||||
"@angular/language-service": "^16.1.1"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue