feat: basic nvim setup and other partially working stuff

This commit is contained in:
2024-01-26 16:49:00 +01:00
parent 18239963dd
commit 0275a24b1f
9 changed files with 121 additions and 6 deletions

View File

@@ -0,0 +1,21 @@
import { useTerminalCanvas } from "~/context/TerminalCanvasContext";
import { type CellStyle } from "~/utils/terminal/cell";
export const TerminalCell = (props: {
x: number;
y: number;
children: Array<string> | string;
style?: CellStyle;
}) => {
const canvas = useTerminalCanvas();
const text = Array.isArray(props.children)
? props.children.join("")
: props.children;
canvas.apply(props.x, props.y, {
char: text,
...(props.style ?? {}),
});
return null;
};