nvim - update mason-lspconfig usage

This commit is contained in:
2025-05-13 10:33:23 -05:00
parent 0903f1234f
commit d08ce2685e
2 changed files with 11 additions and 2 deletions

View File

@@ -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 :<leader>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
}

View File

@@ -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)