AutoYADM commit: 2025-04-22 18:15:06

This commit is contained in:
Daniel Fichtinger 2025-04-22 18:15:06 -04:00
parent 5bb20dda7c
commit 7cfc5f8797
2 changed files with 9 additions and 3 deletions

View file

@ -68,6 +68,7 @@ diagnostics = ["warning", "error"]
workspace-diagnostics = ["warning", "error"]
[editor.lsp]
# enable = false
display-inlay-hints = true
display-messages = true
display-progress-messages = true
@ -101,6 +102,10 @@ s = "select_mode"
# reload lsp
C-r = ":lsp-restart"
# toggle lsp
# C-r = '@:toggle lsp.enable<ret>:echo %sh{sleep 0.1}<ret>:lsp-restart<ret>'
C-A-r = ":lsp-stop"
# config file stuff
A-r = ":config-reload"

View file

@ -100,16 +100,17 @@ if not string match -q '*.typ' $src
qecho "$(path basename $src) is not a Typst file!"
return $ret
end
# change to pdf extension
# change abs path to pdf extension
set -l targ (string replace '.typ' '.pdf' $src)
# get pdf target's base name
set -l base (path basename --no-extension $src).pdf
# if a suitable pdf exists in the same dir, open it
if test -f "$targ"
# zathura "$targ" &>/dev/null &
zopen "$targ"
else
# no such file in current dir, time to search!
# if we're in a git repo, search from root
# if we're in a git repo, search from its root
# if we're not, search from cwd
if git rev-parse --is-inside-work-tree &>/dev/null
set root (git rev-parse --show-toplevel)