[NeoVim] The world is now Fennel

This commit is contained in:
2022-08-24 01:59:24 +02:00
parent 3941e53268
commit 623b7fb584
6 changed files with 96 additions and 151 deletions

View File

@@ -21,8 +21,8 @@
(match client.name name (lua "return client")))))
(fn update_config [lang configtype] (let [client (get_client_by_name "ltex")]
(if (not= client nil)
(if (not= (. client.config.settings.ltex configtype) nil)
(if client
(if (. client.config.settings.ltex configtype)
(do (tset client.config.settings.ltex configtype {lang (lines_from (. files configtype))})
(client.notify "workspace/didChangeConfiguration" client.config.settings))
(vim.notify "Error when reading dictionary config, check it")))))
@@ -31,7 +31,7 @@
(do (each [_ v (ipairs dict)]
(if (= v value) (lua "return nil")))
(let [file (io.open file "a+")]
(if (not= file nil)
(if file
(do (file.write file (.. value "\n"))
(file.close file)
(update_config lang configtype))