Home / Function/ getSettings() — astro Function Reference

getSettings() — astro Function Reference

Architecture documentation for the getSettings() function in yaml.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  8cf0491b_0fe2_bfaa_a91f_3ea661d10308["getSettings()"]
  5e9b95b7_b879_26fe_0542_7582ae13ba27["yaml.ts"]
  8cf0491b_0fe2_bfaa_a91f_3ea661d10308 -->|defined in| 5e9b95b7_b879_26fe_0542_7582ae13ba27
  1420ef9d_e0ca_f05c_ef82_425d7b4326a0["create()"]
  1420ef9d_e0ca_f05c_ef82_425d7b4326a0 -->|calls| 8cf0491b_0fe2_bfaa_a91f_3ea661d10308
  style 8cf0491b_0fe2_bfaa_a91f_3ea661d10308 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/language-tools/language-server/src/plugins/yaml.ts lines 14–42

export function getSettings(collectionConfig: CollectionConfig): LanguageSettings {
	const schemas = collectionConfig.configs.flatMap((workspaceCollectionConfig) => {
		return workspaceCollectionConfig.config.collections.flatMap((collection) => {
			return {
				fileMatch: SUPPORTED_FRONTMATTER_EXTENSIONS_KEYS.map(
					(ext) => `volar-embedded-content://yaml_frontmatter_${collection.name}/**/*${ext}`,
				),
				uri: Utils.joinPath(
					workspaceCollectionConfig.folder,
					'.astro/collections',
					`${collection.name}.schema.json`,
				).toString(),
			};
		});
	});

	return {
		completion: true,
		format: false,
		hover: true,
		validate: true,
		customTags: [],
		yamlVersion: '1.2',
		isKubernetes: false,
		parentSkeletonSelectedFirst: false,
		disableDefaultProperties: false,
		schemas: schemas,
	};
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does getSettings() do?
getSettings() is a function in the astro codebase, defined in packages/language-tools/language-server/src/plugins/yaml.ts.
Where is getSettings() defined?
getSettings() is defined in packages/language-tools/language-server/src/plugins/yaml.ts at line 14.
What calls getSettings()?
getSettings() is called by 1 function(s): create.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free