From 7cfc5f8797888eabc5c6729d1b5717a5fd85d6d2 Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Tue, 22 Apr 2025 18:15:06 -0400 Subject: [PATCH] AutoYADM commit: 2025-04-22 18:15:06 --- .config/helix/config.toml | 5 +++++ .config/helix/scripts/typst-zathura.fish | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.config/helix/config.toml b/.config/helix/config.toml index 660e0c85..7372b2d9 100644 --- a/.config/helix/config.toml +++ b/.config/helix/config.toml @@ -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:echo %sh{sleep 0.1}:lsp-restart' + + C-A-r = ":lsp-stop" # config file stuff A-r = ":config-reload" diff --git a/.config/helix/scripts/typst-zathura.fish b/.config/helix/scripts/typst-zathura.fish index 95fbcc3c..c076cc95 100755 --- a/.config/helix/scripts/typst-zathura.fish +++ b/.config/helix/scripts/typst-zathura.fish @@ -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)