summaryrefslogtreecommitdiff
path: root/fnl/plugins/lsp/lspconfig.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/plugins/lsp/lspconfig.fnl')
-rw-r--r--fnl/plugins/lsp/lspconfig.fnl24
1 files changed, 3 insertions, 21 deletions
diff --git a/fnl/plugins/lsp/lspconfig.fnl b/fnl/plugins/lsp/lspconfig.fnl
index 6e2ace4..e498056 100644
--- a/fnl/plugins/lsp/lspconfig.fnl
+++ b/fnl/plugins/lsp/lspconfig.fnl
@@ -7,32 +7,14 @@
buffer (. args :buf)]
(keymaps.on-attach buffer)))}))
-(fn capabilities []
- (let [cmp-lsp (require :cmp_nvim_lsp)]
- (cmp-lsp.default_capabilities (vim.lsp.protocol.make_client_capabilities))))
-
-(fn handlers [server]
- (let [servers (require :plugins.lsp.servers)
- lspconfig (require :lspconfig)]
- (let [config (. lspconfig server)
- opts (or (. servers server) {})]
- (tset opts :capabilities (capabilities))
- (config.setup opts))))
-
-(fn setup-mason-lspconfig []
- (let [mason-lspconfig (require :mason-lspconfig)
- servers (require :plugins.lsp.servers)]
- (mason-lspconfig.setup {:ensure_installed (vim.tbl_keys servers)
- :automatic_installation true
- :handlers [handlers]})))
-
(fn config []
(on-attach)
(let [diagnostics (require :plugins.lsp.diagnostics)
+ mason-lspconfig (require :plugins.lsp.mason-lspconfig)
ui (require :lspconfig.ui.windows)]
- (diagnostics.setup)
(set ui.default_options.border :single)
- (setup-mason-lspconfig)))
+ (diagnostics.setup)
+ (mason-lspconfig.setup)))
{1 :neovim/nvim-lspconfig
:event :BufReadPost