Clean up fennel function names

This commit is contained in:
2022-12-02 16:38:31 -08:00
parent 043d485629
commit 77e6a35fa1
3 changed files with 11 additions and 11 deletions

View File

@ -9,12 +9,12 @@
lsp_cap (module-call! :cmp_nvim_lsp :default_capabilities)]
(module-call! :jdtls :start_or_attach
{ :capabilities lsp_cap
:on_attach (module-fn! :plugin.lsp :on_attach)
:on_attach (module-fn! :plugin.lsp :on-attach)
:root_dir root_dir
:cmd [ "jdtls"
"-data"
(module-call! :plugin.lsp
:get_data_dir
:get-data-dir
:jdtls root_dir) ]}))))
{: configure}

View File

@ -2,7 +2,7 @@
(import-macros {: bind!} :macros)
(fn on_attach [_ buf]
(fn on-attach [_ buf]
(bind! :n :gD vim.lsp.buf.declaration buf)
(bind! :n :gd vim.lsp.buf.definition buf)
(bind! :n :K vim.lsp.buf.hover buf)
@ -28,7 +28,7 @@
(bind! :n :<leader>fd fzf.lsp_document_symbols buf)
(bind! :n :<leader>cn fzf.lsp_code_actions buf)))
(fn get_data_dir [server root]
(fn get-data-dir [server root]
(let [resolved_path (vim.fn.resolve root)
joined_path (vim.fn.substitute resolved_path "\\/" "@" :g)]
(.. (vim.fn.fnamemodify (.. "~/.local/nvim/lsp-cache/"
@ -42,7 +42,7 @@
lsp_cap ((. (require :cmp_nvim_lsp) :default_capabilities))
lsp_utils (require :plugin.lsp)]
(macro setup_server! [name ...]
(let [opts { :on_attach `lsp_utils.on_attach
(let [opts { :on-attach `lsp_utils.on_attach
:capabilities `lsp_cap }]
(var last_key nil)
(each [_ val (ipairs [...])]
@ -84,4 +84,4 @@
(if configs.fennel_language_server.setup
(setup_server! :fennel_language_server))))
{ : configure : on_attach : get_data_dir }
{ : configure : on-attach : get-data-dir }