AutoYADM commit: 2025-06-06 16:10:06
This commit is contained in:
parent
9c2bf2b566
commit
53b8fc9ac6
3 changed files with 24 additions and 24 deletions
|
@ -21,19 +21,20 @@ hook global WinSetOption filetype=kak %{
|
|||
hook global WinSetOption filetype=typst %{
|
||||
set-option buffer formatcmd "typstyle --wrap-text"
|
||||
hook -group typst-auto-format window BufWritePre .* format
|
||||
hook -once -always WinSetOption filetype=.* %{
|
||||
hook -once -always window WinSetOption filetype=.* %{
|
||||
unset-option window formatcmd
|
||||
remove-hooks window typst-auto-format
|
||||
}
|
||||
define-command -docstring %{
|
||||
Spawns a Zathura pdf preview and Typst watcher for the currently open Typst file
|
||||
} typst %{
|
||||
nop %sh{
|
||||
{
|
||||
"$kak_config/scripts/kak-typ-zathura.fish" -k -w "$kak_buffile" "$kak_client_pid"
|
||||
} > /dev/null 2>&1 < /dev/null &
|
||||
}
|
||||
}
|
||||
define-command -docstring %{
|
||||
Spawns a Zathura pdf preview and Typst watcher for the currently open Typst file
|
||||
} typst %{
|
||||
nop %sh{
|
||||
{
|
||||
"$kak_config/scripts/kak-typ-zathura.fish" -k -w "$kak_buffile" "$kak_client_pid"
|
||||
} > /dev/null 2>&1 < /dev/null &
|
||||
}
|
||||
}
|
||||
nop %sh{ notify-send "4" }
|
||||
}
|
||||
|
||||
hook global WinSetOption filetype=fish %{
|
||||
|
|
|
@ -21,11 +21,13 @@ hook global WinSetOption filetype=typst %(
|
|||
hook window InsertChar \n -group typst-indent typst-indent-on-new-line
|
||||
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window typst-.+ }
|
||||
nop %sh{ notify-send "2" }
|
||||
)
|
||||
|
||||
hook -group typst-highlight global WinSetOption filetype=typst %{
|
||||
add-highlighter window/typst ref typst
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/typst }
|
||||
nop %sh{ notify-send "3" }
|
||||
}
|
||||
|
||||
provide-module typst %~
|
||||
|
|
|
@ -95,17 +95,17 @@ map -docstring 'Extend to file end' global user n "gj<a-l>l"
|
|||
|
||||
# Zathura pdf preview only for Typst files
|
||||
|
||||
hook global WinSetOption filetype=typst %{
|
||||
define-command -docstring %{
|
||||
Spawns a Zathura pdf preview and Typst watcher for the currently open Typst file
|
||||
} typst %{
|
||||
nop %sh{
|
||||
{
|
||||
"$kak_config/scripts/kak-typ-zathura.fish" -k -w "$kak_buffile" "$kak_client_pid"
|
||||
} > /dev/null 2>&1 < /dev/null &
|
||||
}
|
||||
}
|
||||
}
|
||||
# hook global WinSetOption filetype=typst %{
|
||||
# define-command -docstring %{
|
||||
# Spawns a Zathura pdf preview and Typst watcher for the currently open Typst file
|
||||
# } typst %{
|
||||
# nop %sh{
|
||||
# {
|
||||
# "$kak_config/scripts/kak-typ-zathura.fish" -k -w "$kak_buffile" "$kak_client_pid"
|
||||
# } > /dev/null 2>&1 < /dev/null &
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
|
||||
define-command -docstring "Create a scratch buffer" scratch %{
|
||||
edit -scratch
|
||||
|
@ -197,6 +197,3 @@ map -docstring 'popup shell' global user . ': popup-shell<ret>'
|
|||
# }
|
||||
# }
|
||||
|
||||
hook -once global BufCreate ^(?!(\*scratch\*|\*debug\*)) %{
|
||||
delete-buffer *scratch*
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue