AutoYADM commit: 2025-06-14 00:58:41
This commit is contained in:
parent
0675694c18
commit
540b826d0b
1 changed files with 26 additions and 0 deletions
|
@ -2,6 +2,32 @@
|
|||
eval %sh{kak-lsp}
|
||||
# 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
|
||||
map global user l ': enter-user-mode lsp<ret>' -docstring 'LSP mode'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue