diff --git a/nvim/.config/nvim/fnl/dotfiles/plugin/lspconfig.fnl b/nvim/.config/nvim/fnl/dotfiles/plugin/lspconfig.fnl index 7ad30d0..2fb9aaa 100644 --- a/nvim/.config/nvim/fnl/dotfiles/plugin/lspconfig.fnl +++ b/nvim/.config/nvim/fnl/dotfiles/plugin/lspconfig.fnl @@ -135,6 +135,11 @@ args (a.concat opts [...])] (vim.lsp.buf.execute_command {:command cmd :arguments args}))) + +(fn setup-handlers [language_servers] + (each [_ server-name (pairs language_servers)] + (default-server-handler server-name))) + (u.nnoremap :li :LspInfo) (vim.api.nvim_create_user_command :LspExecuteCommand lsp-execute-command {}) @@ -144,4 +149,8 @@ ; (mason-lspconfig.setup) ; (mason-lspconfig.setup_handlers [default-server-handler]))) -{: on_attach : default-server-handler} +{: on_attach + : default-server-handler + : setup-handlers + } + diff --git a/nvim/.config/nvim/fnl/dotfiles/plugin/mason.fnl b/nvim/.config/nvim/fnl/dotfiles/plugin/mason.fnl index de435ba..de8872c 100644 --- a/nvim/.config/nvim/fnl/dotfiles/plugin/mason.fnl +++ b/nvim/.config/nvim/fnl/dotfiles/plugin/mason.fnl @@ -8,7 +8,7 @@ (mason.setup {:ui {:icons {:package_installed "✓"}}}) (when mason-lspconf (mason-lspconf.setup {:ensure_installed [:lua_ls]}) - (mason-lspconf.setup_handlers [lspconfig.default-server-handler]))) + (lspconfig.setup-handlers (mason-lspconf.get_installed_servers)))) (setup) ;; (mason.setup)