summaryrefslogtreecommitdiff
path: root/fnl
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2024-01-07 11:42:44 +0100
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2024-01-07 11:42:44 +0100
commitcd876f8e53385c63b3b3048a0917dd58786e1467 (patch)
tree98785ca81b0202d5f18777b1e67f3cfae2ea8740 /fnl
parentd10a8bf90ecb8a2369d08bb40744d3724d33b3d4 (diff)
Refactor mason-lspconfig
Diffstat (limited to 'fnl')
-rw-r--r--fnl/plugins/lsp/lspconfig.fnl16
1 files changed, 8 insertions, 8 deletions
diff --git a/fnl/plugins/lsp/lspconfig.fnl b/fnl/plugins/lsp/lspconfig.fnl
index 8cc5141..6e2ace4 100644
--- a/fnl/plugins/lsp/lspconfig.fnl
+++ b/fnl/plugins/lsp/lspconfig.fnl
@@ -19,20 +19,20 @@
(tset opts :capabilities (capabilities))
(config.setup opts))))
-(fn opts []
- (let [servers (require :plugins.lsp.servers)]
- {:ensure_installed (vim.tbl_keys servers)
- :automatic_installation true
- :handlers [handlers]}))
+(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)
- ui (require :lspconfig.ui.windows)
- mason-lspconfig (require :mason-lspconfig)]
+ ui (require :lspconfig.ui.windows)]
(diagnostics.setup)
(set ui.default_options.border :single)
- (mason-lspconfig.setup (opts))))
+ (setup-mason-lspconfig)))
{1 :neovim/nvim-lspconfig
:event :BufReadPost