Skip to content

Commit

Permalink
Add formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelzw committed Jul 2, 2024
1 parent 9419c2f commit a1e21dd
Show file tree
Hide file tree
Showing 6 changed files with 1,490 additions and 10 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: CI
on:
push:
branches:
- main
pull_request:

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v4
- name: Set up pixi
uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659
- name: pre-commit
run: pixi run pre-commit-run --color=always --show-diff-on-failure
37 changes: 37 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
exclude: ^.pixi
repos:
- repo: local
hooks:
# ensure pixi environments are up to date
# workaround for https://github.com/prefix-dev/pixi/issues/1482
- id: pixi-install
name: pixi-install
entry: pixi install -e default
language: system
always_run: true
require_serial: true
pass_filenames: false
# typstyle
- id: typstyle
name: typstyle
entry: pixi run typstyle -i
language: system
files: \.typ$
# pre-commit-hooks
- id: trailing-whitespace-fixer
name: trailing-whitespace-fixer
entry: pixi run trailing-whitespace-fixer
language: system
types: [text]
- id: end-of-file-fixer
name: end-of-file-fixer
entry: pixi run end-of-file-fixer
language: system
types: [text]
# typos
- id: typos
name: typos
entry: pixi run typos --force-exclude
language: system
types: [text]
require_serial: true
6 changes: 3 additions & 3 deletions example.typ
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
social: (
email: "[email protected]",
github: "jane-doe",
linkedin: "jane-doe"
linkedin: "jane-doe",
),
)

Expand All @@ -31,13 +31,13 @@
date: [4/2022 -- 7/2023],
employer: [The Snake Company],
title: [Snake Specialist],
[#linebreak()#text(10pt, lorem(30))]
[#linebreak()#text(10pt, lorem(30))],
)
#cv-entry(
date: [4/2022 -- 7/2023],
employer: [Viper Ventures],
title: [Working Student],
[#linebreak()#text(10pt, lorem(30))]
[#linebreak()#text(10pt, lorem(30))],
)

= Programming Skills
Expand Down
16 changes: 9 additions & 7 deletions moderner-cv.typ
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@
socialsList.push(social("github", "https://github.com/", socials.github))
}
if "linkedin" in socials {
socialsList.push(social("linkedin", "https://linkedin.com/in/", socials.linkedin))
socialsList.push(
social("linkedin", "https://linkedin.com/in/", socials.linkedin),
)
}

let socialStack = stack(
Expand All @@ -51,9 +53,10 @@
stack(
dir: ltr,
titleStack,
align(right + top,
socialStack
)
align(
right + top,
socialStack,
),
)
}

Expand All @@ -74,11 +77,11 @@
bottom: 15mm,
left: 15mm,
right: 15mm,
)
),
)
#set text(
font: font,
lang: lang
lang: lang,
)

#show heading: it => {
Expand Down Expand Up @@ -109,7 +112,6 @@
#name\
#datetime.today().display("[month repr:long] [day], [year]")
]
]
#let cv-line(left-side, right-side) = {
Expand Down
Loading

0 comments on commit a1e21dd

Please sign in to comment.