diff --git a/.config/kak/autoload/lsp.kak b/.config/kak/autoload/lsp.kak index 3609f8d8..e28dd079 100644 --- a/.config/kak/autoload/lsp.kak +++ b/.config/kak/autoload/lsp.kak @@ -153,6 +153,9 @@ hook -group lsp-filetype-python global BufSetOption filetype=python %{ remove-hooks global lsp-filetype-latex hook -group lsp-filetype-latex global BufSetOption filetype=latex %{ + declare-option str foobartest %{ + dictionary = { "en-US" = ["builtin", "Fichtinger", "SonarAuth", "sexpenis" ], "en-CA" = ["more", "words"] } + } set-option buffer lsp_servers %{ [ltex-ls-plus] root_globs = [".git", ".hg", "main.tex"] @@ -160,7 +163,7 @@ hook -group lsp-filetype-latex global BufSetOption filetype=latex %{ # TODO: write a script where the dictionary is a list of words # that's read from a file and then output in TOML format. # This way we can implement adding our own words to this list dynamically - dictionary = { "en-US" = ["builtin", "Fichtinger", "SonarAuth" ] } + %opt{foobartest} [texlab] root_globs = [".git", ".hg"] diff --git a/.config/kak/autoload/ltex-dict.kak b/.config/kak/autoload/ltex-dict.kak index 8b8ff988..fc619359 100644 --- a/.config/kak/autoload/ltex-dict.kak +++ b/.config/kak/autoload/ltex-dict.kak @@ -1,5 +1,13 @@ provide-module ltex-dict %~ declare-option str ltex_dict_path %exp{%val{config}/ltex-dict.txt} + declare-option -hidden str ltex_tomlize %{ + '%Zbi"a"zr,x_i[a]' + } + define-command ltex-dict-read %{ + echo -debug %sh{ + cat "$kak_opt_ltex_dict_path" | kak -f '%Zbi"a"zr,x_i[a]' + } + } ~ diff --git a/.config/kak/ltex-dict.txt b/.config/kak/ltex-dict.txt new file mode 100644 index 00000000..72c5265b --- /dev/null +++ b/.config/kak/ltex-dict.txt @@ -0,0 +1,4 @@ +apple +banana +cherry +