configure prettier and nvim lsp formatter

This commit is contained in:
Ivan Dimitrov 2023-11-19 10:30:37 +02:00
parent d6f2ef7030
commit eff108c7d0
5 changed files with 42 additions and 17 deletions

View File

@ -130,11 +130,11 @@
"systems": "systems_3"
},
"locked": {
"lastModified": 1700373922,
"narHash": "sha256-Oo/NJYrThscD5cIjLa3QmfJzl4spaOGVKWodZw+kAsk=",
"lastModified": 1700381416,
"narHash": "sha256-aRPRwB6Wq7IeqAzYBfmOvmJhBL8vtWLinBzC2unIdFI=",
"owner": "ivandimitrov8080",
"repo": "flake-ide",
"rev": "d5d0c8e62bfaf7c1f84dc34516f6be6f269cb1fb",
"rev": "2bb917c7b939e00166ef3a04ced321313036e0ce",
"type": "github"
},
"original": {

View File

@ -23,7 +23,9 @@
jsonls.enable = true;
tailwindcss.enable = true;
cssls.enable = true;
efm.enable = true;
};
efmls-configs.enable = true;
};
};
buildInputs = with pkgs; [

View File

@ -37,5 +37,14 @@
"tailwindcss": "latest",
"eslint": "latest",
"eslint-config-next": "latest"
},
"prettier": {
"tabWidth": 2,
"semi": true,
"singleQuote": false,
"printWidth": 120,
"bracketSameLine": true,
"arrowParens": "avoid",
"proseWrap": "always"
}
}

View File

@ -1,18 +1,23 @@
import Link from "next/link";
import { getCases } from "$lib/content";
const CasesPage = () =>
const CasesPage = () => (
<div className="p-20 w-full h-full flex flex-col gap-4 overflow-y-scroll">
{getCases().filter(c => !c.data.draft).sort((a, b) => Number(b.data.z) - Number(a.data.z)).map((c) => c.data).map((d) =>
<div key={d.slug} className="w-full lg:w-3/4 mx-auto h-max flex justify-center rounded-lg border-2">
<div className="gradient w-full">
<Link className="btn flex flex-col w-full text-center" href={d.slug}>
<span className="text-lg px-6">{d.title}</span>
<span>{d.date}</span>
</Link>
{getCases()
.filter(c => !c.data.draft)
.sort((a, b) => Number(b.data.z) - Number(a.data.z))
.map(c => c.data)
.map(d => (
<div key={d.slug} className="w-full lg:w-3/4 mx-auto h-max flex justify-center rounded-lg border-2">
<div className="gradient w-full">
<Link className="btn flex flex-col w-full text-center" href={d.slug}>
<span className="text-lg px-6">{d.title}</span>
<span>{d.date}</span>
</Link>
</div>
</div>
</div>
)}
))}
</div>
);
export default CasesPage
export default CasesPage;

View File

@ -2,16 +2,25 @@ import { faGithub, faGitlab } from "@fortawesome/free-brands-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import Link from "next/link";
const Home = () =>
const Home = () => (
<div className="grid w-full h-full place-content-center">
<div className={"grid grid-cols-2 gap-4 place-content-center"}>
<Link aria-label="GitHub" href={process.env.NEXT_PUBLIC_GITHUB_URL!} target="_blank">
<Link
aria-label="GitHub"
href={process.env.NEXT_PUBLIC_GITHUB_URL!}
target="_blank"
>
<FontAwesomeIcon className="w-14 h-14" icon={faGithub} />
</Link>
<Link aria-label="GitLab" href={process.env.NEXT_PUBLIC_GITLAB_URL!} target="_blank">
<Link
aria-label="GitLab"
href={process.env.NEXT_PUBLIC_GITLAB_URL!}
target="_blank"
>
<FontAwesomeIcon className="w-14 h-14" icon={faGitlab} />
</Link>
</div>
</div>
);
export default Home;