AutoYADM commit: 2025-06-14 02:30:09
This commit is contained in:
parent
2fee6412de
commit
0d8b5aa3cd
1 changed files with 4 additions and 10 deletions
|
@ -4,19 +4,13 @@ provide-module ltex-dict %~
|
||||||
declare-option -hidden str ltex_tomlize %{
|
declare-option -hidden str ltex_tomlize %{
|
||||||
'%<a-J>Zbi"<esc>a"<esc>z<a-,>r,x_i[<esc>a]<esc>'
|
'%<a-J>Zbi"<esc>a"<esc>z<a-,>r,x_i[<esc>a]<esc>'
|
||||||
}
|
}
|
||||||
define-command ltex-dict-read %{
|
define-command ltex-dict-set %{
|
||||||
set-register 'a' %sh{
|
|
||||||
cat "$kak_opt_ltex_dict_path" | kak -f '%<a-J>Zbi"<esc>a"<esc>z<a-,>r,x_i[<esc>a]<esc>'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
define-command ltex-dict-set -params 1 %{
|
|
||||||
declare-option str foobartest ''
|
declare-option str foobartest ''
|
||||||
set-option buffer foobartest %sh{
|
set-option buffer foobartest %sh{
|
||||||
# printf %s "$kak_opt_lsp_servers" | sed
|
# printf %s "$kak_opt_lsp_servers" | sed
|
||||||
cmd='cat "$kak_opt_ltex_dict_path" | kak -f %<a-J>Zbi"<esc>a"<esc>z<a-,>r,x_i[<esc>a]<esc>'
|
list="$(cat "$kak_opt_ltex_dict_path" | kak -f '%<a-J>Zbi"<esc>a"<esc>z<a-,>r,x_i[<esc>a]<esc>')"
|
||||||
printf %s "$(cat /tmp/lspconf.txt)" | kak -f "$(printf '<a-s><a-k>\\hdictionary =<ret>s\\[|\\]<ret>m|%s<ret>' "$cmd")"
|
# cat /tmp/lspconf.txt | sed "/^\s*dictionary =/ s/\[\]/$list/g"
|
||||||
|
printf "$kak_opt_lsp_servers" | sed "/^\s*dictionary =/ s/\[\]/$list/g"
|
||||||
# printf %s "$kak_opt_lsp_servers" | kak -f "$(printf '<a-s><a-k>\\hdictionary =<ret>s\\[|\\]<ret>m|%s<ret>' "$cmd"
|
|
||||||
}
|
}
|
||||||
echo -debug %opt{foobartest}
|
echo -debug %opt{foobartest}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue