AutoYADM commit: 2025-06-14 04:03:00

This commit is contained in:
Daniel Fichtinger 2025-06-14 04:03:00 -04:00
parent 5ffe0c53a3
commit 5c4975d4e2
3 changed files with 10 additions and 15 deletions

View file

@ -153,8 +153,6 @@ hook -group lsp-filetype-python global BufSetOption filetype=python %{
remove-hooks global lsp-filetype-latex remove-hooks global lsp-filetype-latex
hook -group lsp-filetype-latex global BufSetOption filetype=latex %{ hook -group lsp-filetype-latex global BufSetOption filetype=latex %{
declare-option str foobartest %{
}
set-option buffer lsp_servers %{ set-option buffer lsp_servers %{
[ltex-ls-plus] [ltex-ls-plus]
root_globs = [".git", ".hg", "main.tex"] root_globs = [".git", ".hg", "main.tex"]
@ -192,8 +190,8 @@ hook -group lsp-filetype-latex global BufSetOption filetype=latex %{
""", """,
] ]
} }
# require-module ltex-dict require-module ltex-dict
# ltex-dict-set ltex-dict-set
define-command -docstring 'Add selection to ltex-ls dictionary' ltex-add %{ define-command -docstring 'Add selection to ltex-ls dictionary' ltex-add %{
set-option buffer lsp_servers %sh{ set-option buffer lsp_servers %sh{
printf %s "$kak_opt_lsp_servers" | kak -f "$(printf '<a-s><a-k>dictionary =<ret>s\\[.*\\]<ret><a-i>]_a, "%s"' "$kak_selection")" printf %s "$kak_opt_lsp_servers" | kak -f "$(printf '<a-s><a-k>dictionary =<ret>s\\[.*\\]<ret><a-i>]_a, "%s"' "$kak_selection")"

View file

@ -1,20 +1,18 @@
provide-module ltex-dict %~ 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}
declare-option -hidden str ltex_tomlize %{
'%<a-J>Zbi"<esc>a"<esc>z<a-,>r,x_i[<esc>a]<esc>'
}
define-command ltex-dict-set %{ define-command ltex-dict-set %{
# declare-option str foobartest ''
set-option buffer lsp_servers %sh{ set-option buffer lsp_servers %sh{
# printf %s "$kak_opt_lsp_servers" | sed 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-J>Zbi\"<esc>a\"<esc>z<a-,>r,x_i[<esc>a]<esc>')"
notify-send "$list"
# cat /tmp/lspconf.txt | 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/\[\]/$list/g"
} }
echo -debug %opt{lsp_servers} }
# echo -debug %opt{foobartest} define-command ltex-add %{
evaluate-commands %sh{
if [ "$kak_selection_length" = 1 ]; then
printf 'execute-keys bw_<a-|>tee -a /tmp/test.txt'
}
} }
~ ~

View file

@ -1,4 +1,3 @@
foobartest foobartest
apple apple
SonarAuth SonarAuth