AutoYADM commit: 2025-06-14 04:18:00
This commit is contained in:
parent
5c4975d4e2
commit
3cb87ea64d
1 changed files with 8 additions and 3 deletions
|
@ -3,15 +3,20 @@ provide-module ltex-dict %~
|
||||||
declare-option str ltex_dict_path %exp{%val{config}/ltex-dict.txt}
|
declare-option str ltex_dict_path %exp{%val{config}/ltex-dict.txt}
|
||||||
define-command ltex-dict-set %{
|
define-command ltex-dict-set %{
|
||||||
set-option buffer lsp_servers %sh{
|
set-option buffer lsp_servers %sh{
|
||||||
|
echo >/tmp/test.txt
|
||||||
list="$(cat "$kak_opt_ltex_dict_path" | kak -f '<a-o>%<a-J>Zbi\"<esc>a\"<esc>z<a-,>r,x_i[<esc>a]<esc>')"
|
list="$(cat "$kak_opt_ltex_dict_path" | kak -f '<a-o>%<a-J>Zbi\"<esc>a\"<esc>z<a-,>r,x_i[<esc>a]<esc>')"
|
||||||
|
notify-send "$list"
|
||||||
echo "$kak_opt_lsp_servers" | sed "/^\s*dictionary =/ s/\[\]/$list/g"
|
echo "$kak_opt_lsp_servers" | sed "/^\s*dictionary =/ s/\[\]/$list/g"
|
||||||
|
echo "$kak_opt_lsp_servers" | sed "/^\s*dictionary =/ s/\[\]/REPLACED/g" >/tmp/test.txt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
define-command ltex-add %{
|
define-command ltex-add %{
|
||||||
evaluate-commands %sh{
|
execute-keys -draft %sh{
|
||||||
if [ "$kak_selection_length" = 1 ]; then
|
if [ "$kak_selection_length" = 1 ]; then
|
||||||
printf 'execute-keys bw_<a-|>tee -a /tmp/test.txt'
|
printf 'bw_<a-|>{ cat; echo; } | tee -a %s<ret>\n' "$kak_opt_ltex_dict_path"
|
||||||
|
else
|
||||||
|
printf '<a-|>{ cat; echo; } | tee -a %s<ret>\n' "$kak_opt_ltex_dict_path"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue