|
|
@ -1,5 +1,18 @@
|
|
|
|
|
|
|
|
(local lspconfig (require :lspconfig))
|
|
|
|
(local {: lsp} vim)
|
|
|
|
(local {: lsp} vim)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;; fennel-ls
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(let [configs (require :lspconfig.configs)]
|
|
|
|
|
|
|
|
(tset configs :fennel-ls
|
|
|
|
|
|
|
|
{:default_config {:cmd [:/opt/homebrew/bin/fennel-ls]
|
|
|
|
|
|
|
|
:filetypes [:fennel]
|
|
|
|
|
|
|
|
:root_dir #(lspconfig.util.find_git_ancestor $1)
|
|
|
|
|
|
|
|
:settings {}}}))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(let [{: fennel-ls} lspconfig]
|
|
|
|
|
|
|
|
(fennel-ls.setup (vim.lsp.protocol.make_client_capabilities)))
|
|
|
|
|
|
|
|
|
|
|
|
;; (lsp.set_log_level :debug)
|
|
|
|
;; (lsp.set_log_level :debug)
|
|
|
|
|
|
|
|
|
|
|
|
;; default hover windows to have borders
|
|
|
|
;; default hover windows to have borders
|
|
|
@ -47,8 +60,7 @@
|
|
|
|
(set client.resolved_capabilities.document_formatting false))
|
|
|
|
(set client.resolved_capabilities.document_formatting false))
|
|
|
|
|
|
|
|
|
|
|
|
(fn setup-lsp [lsp config]
|
|
|
|
(fn setup-lsp [lsp config]
|
|
|
|
(let [lspconfig (require :lspconfig)
|
|
|
|
(let [{: setup} (. lspconfig lsp)]
|
|
|
|
{: setup} (. lspconfig lsp)]
|
|
|
|
|
|
|
|
(setup (or config {:on_attach on-attach}))))
|
|
|
|
(setup (or config {:on_attach on-attach}))))
|
|
|
|
|
|
|
|
|
|
|
|
(let [fmt #{:formatCommand $1 :formatStdin true}
|
|
|
|
(let [fmt #{:formatCommand $1 :formatStdin true}
|
|
|
@ -84,6 +96,7 @@
|
|
|
|
:typescriptreact
|
|
|
|
:typescriptreact
|
|
|
|
:vue]})
|
|
|
|
:vue]})
|
|
|
|
(setup-lsp :elmls)
|
|
|
|
(setup-lsp :elmls)
|
|
|
|
|
|
|
|
(setup-lsp :fennel-ls)
|
|
|
|
(setup-lsp :pylsp {:on_attach (on-attach-do attach-navic disable-fmt)})
|
|
|
|
(setup-lsp :pylsp {:on_attach (on-attach-do attach-navic disable-fmt)})
|
|
|
|
(setup-lsp :pyright
|
|
|
|
(setup-lsp :pyright
|
|
|
|
{:on_attach on-attach
|
|
|
|
{:on_attach on-attach
|
|
|
@ -95,3 +108,4 @@
|
|
|
|
(setup-lsp :tsserver {:on_attach (on-attach-do attach-navic disable-fmt)})
|
|
|
|
(setup-lsp :tsserver {:on_attach (on-attach-do attach-navic disable-fmt)})
|
|
|
|
(setup-lsp :typeprof)
|
|
|
|
(setup-lsp :typeprof)
|
|
|
|
(setup-lsp :vuels {:on_attach (on-attach-do attach-navic disable-fmt)}))
|
|
|
|
(setup-lsp :vuels {:on_attach (on-attach-do attach-navic disable-fmt)}))
|
|
|
|
|
|
|
|
|
|
|
|