Use Treesitter Syntax Highlighting
Opened this issue · 1 comments
a-priestley commented
The OGPT output window appears to support rudimentary syntax highlighting for markdown. At runtime, I can substantially improve this by issuing :setfiletype markdown
while inside the OGPT output window, enabling features like fenced code block highlighting(```tsx[linebreak][code][linebreak]```
) resulting in nested language parsing within markdown like the following:
import ErrorComponent, { ErrorProps } from "@/components/error";
import LayoutComponent from "@/components/layout";
export default function Custom404({
errorProps,
version,
}: {
errorProps: ErrorProps;
version: string;
}) {
return (
<LayoutComponent {...{ version }}>
<ErrorComponent props={errorProps} />
</LayoutComponent>
);
}
export const getStaticProps = async () => {
const errorProps = {
title: "404",
description: "Page Not Found",
return: true,
};
return {
props: { errorProps },
};
};
This greatly improves readability for prompt outputs involving code especially.
Is it possible to integrate this capability automatically when loading OGPT?
a-priestley commented