mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-29 06:44:08 +00:00

Co-authored-by: Aurindam Jana <aurindam.jana@slint.dev> Co-authored-by: Tobias Hunger <tobias.hunger@slint.dev> Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
11 lines
358 B
JavaScript
11 lines
358 B
JavaScript
// Copyright © SixtyFPS GmbH <info@slint.dev>
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
import { Facet } from "@codemirror/state";
|
|
|
|
// Define a custom facet to hold the language name
|
|
export const languageNameFacet = Facet.define({
|
|
combine(languages) {
|
|
return languages.length ? languages[0] : null; // Combine to get the first language if set
|
|
},
|
|
});
|