From de1e3e5f5648bdf9d3c7df38d34158188d1b0f45 Mon Sep 17 00:00:00 2001 From: dogeystamp Date: Mon, 10 Jul 2023 13:05:58 -0400 Subject: [PATCH] nvim: update typst stuff typst got updated and now it has TYPST_ROOT. pretty useful --- src/.config/nvim/ultisnips/typst.snippets | 16 ++++++++++------ src/.profile | 3 +++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/.config/nvim/ultisnips/typst.snippets b/src/.config/nvim/ultisnips/typst.snippets index 128260e..3f21fce 100644 --- a/src/.config/nvim/ultisnips/typst.snippets +++ b/src/.config/nvim/ultisnips/typst.snippets @@ -1,5 +1,5 @@ snippet problem "template for problem notes" bi -#import "../templates/problems.typ": template, source_code, status +#import "/templates/problems.typ": template, source_code, status, lref #show: template.with( problem_url: "$1", title: "$2", @@ -9,7 +9,7 @@ snippet problem "template for problem notes" bi endsnippet snippet sfd "template for lecture notes" bi -#import "../../../templates/sfd.typ": template +#import "/templates/sfd.typ": template, lref #show: template.with( lecture_url: "$1", title: "$2", @@ -18,7 +18,7 @@ snippet sfd "template for lecture notes" bi endsnippet snippet contest "template for contest problems" bi -#import "../../templates/contest.typ": template, source_code, status +#import "/templates/contest.typ": template, source_code, status, lref #show: template.with( title: "$1", stat: "${2:incomplete}", @@ -27,7 +27,7 @@ snippet contest "template for contest problems" bi endsnippet snippet algs "template for compsci notes" bi -#import "../templates/algs.typ": template, source_code +#import "/templates/algs.typ": template, source_code, lref #show: template.with( title: "$1", ) @@ -35,7 +35,7 @@ snippet algs "template for compsci notes" bi endsnippet snippet math_prob "template for math problems" bi -#import "../../../templates/math_prob.typ": template +#import "/templates/math_prob.typ": template, lref #show: template.with( title: "$1", ) @@ -43,7 +43,7 @@ snippet math_prob "template for math problems" bi endsnippet snippet proj "template for project documents" bi -#import "../../templates/proj.typ": template +#import "/templates/proj.typ": template, lref #show: template.with( title: "$1", ) @@ -58,6 +58,10 @@ snippet link "link" w #link("${1}")[${2}] endsnippet +snippet lref "refer to another knowledge base doc" w +#lref("/${1}")[${2}] +endsnippet + snippet fig "create new figure" bi #figure( image("fig/`!v expand("%:r")`/$1.svg"), diff --git a/src/.profile b/src/.profile index b496714..b1ea773 100644 --- a/src/.profile +++ b/src/.profile @@ -69,6 +69,9 @@ else . "$XDG_CONFIG_HOME"/dot_profile fi +# Typst root +export TYPST_ROOT="$HOME/nt" + # Add .local/bin to path export PATH="$PATH":~/.local/bin export PATH="$PATH":~/.local/bin/deskutils