Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/AgreementHtml.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Spin } from "antd";
import useAppStore from "./store/store";
import FullScreenModal from "./components/FullScreenModal";

function AgreementHtml({ loading, isModal }: { loading: any; isModal?: boolean }) {
function AgreementHtml({ loading, isModal }: { loading: boolean; isModal?: boolean }) {
const agreementHtml = useAppStore((state) => state.agreementHtml);
const backgroundColor = useAppStore((state) => state.backgroundColor);
const textColor = useAppStore((state) => state.textColor);
Expand Down
23 changes: 23 additions & 0 deletions src/editors/ConcertoEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,26 @@ const handleEditorWillMount = (monacoInstance: typeof monaco) => {
mimetypes: ["application/vnd.accordproject.concerto"],
});

monacoInstance.languages.setLanguageConfiguration("concerto", {
brackets: [
["{", "}"],
["[", "]"],
["(", ")"],
],
autoClosingPairs: [
{ open: "{", close: "}" },
{ open: "[", close: "]" },
{ open: "(", close: ")" },
{ open: "\"", close: "\"" },
],
surroundingPairs: [
{ open: "{", close: "}" },
{ open: "[", close: "]" },
{ open: "(", close: ")" },
{ open: "\"", close: "\"" },
],
});

monacoInstance.languages.setMonarchTokensProvider("concerto", {
keywords: concertoKeywords,
typeKeywords: concertoTypes,
Expand Down Expand Up @@ -125,6 +145,9 @@ export default function ConcertoEditor({
wordWrap: "on",
automaticLayout: true,
scrollBeyondLastLine: false,
autoClosingBrackets: "languageDefined",
autoSurround: "languageDefined",
bracketPairColorization: { enabled: true },
};

const handleChange = useCallback(
Expand Down
2 changes: 1 addition & 1 deletion src/utils/helpers/Errors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Alert, Space } from "antd";
function Errors() {
const error = useAppStore((state) => state.error);
return error ? (
<Space direction="vertical" style={{ width: "100%" }}>
<Space direction="vertical" style={{ width: "100%", margin: "24px 0 0 24px" }}>
<Alert message={error} type="error" />
</Space>
) : (
Expand Down