AutoYADM commit: 2025-06-14 00:58:41

This commit is contained in:
Daniel Fichtinger 2025-06-14 00:58:41 -04:00
parent 0675694c18
commit 540b826d0b

View file

@ -2,6 +2,32 @@
eval %sh{kak-lsp} eval %sh{kak-lsp}
# eval %sh{kak-lsp-diags} # eval %sh{kak-lsp-diags}
define-command -override -hidden lsp-do-send-async %{
echo -quoting shell -to-file /tmp/kak-lsp.txt %reg{a}
echo -quoting shell -to-file %opt{lsp_fifo} %reg{a}
echo -to-file %opt{lsp_fifo} ' '
# nop %sh{ notify-send "this runs!" }
}
define-command -hidden lsp-do-send-sync %{
unset-option buffer lsp_do_send_maybe_sync
evaluate-commands %sh{
tmp=$(mktemp -q -d -t 'kak-lsp-sync.XXXXXX' 2>/dev/null || mktemp -q -d)
pipe=${tmp}/fifo
if ! mkfifo ${pipe}; then
echo 'fail failed to create fifo'
exit
fi
trap "rm -f ${pipe}; rmdir ${tmp} 2>/dev/null" EXIT INT QUIT
printf >${kak_opt_lsp_fifo} "%s '%s' " \
"${kak_quoted_reg_a}" "${pipe}"
cat ${pipe}
}
}
# mappings # mappings
map global user l ': enter-user-mode lsp<ret>' -docstring 'LSP mode' map global user l ': enter-user-mode lsp<ret>' -docstring 'LSP mode'