mirror of
https://github.com/stevenproctor/dotfiles.git
synced 2026-01-28 08:39:56 -06:00
neovim - fix plugin load race condition for mason and lspconfig
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
lsp vim.lsp
|
||||
lspconfig lspconfig
|
||||
nu aniseed.nvim.util
|
||||
mason dotfiles.plugin.mason
|
||||
cmp_nvim_lsp cmp_nvim_lsp}})
|
||||
|
||||
(defn bufmap [mode from to] (u.noremap mode from to {:local? true}))
|
||||
@@ -146,8 +147,11 @@
|
||||
args (a.concat opts [...])]
|
||||
(vim.lsp.buf.execute_command {:command cmd :arguments args})))
|
||||
|
||||
(when-let [mason-lspconfig (require :mason-lspconfig)] (mason-lspconfig.setup)
|
||||
(mason-lspconfig.setup_handlers {1 default-server-handler}))
|
||||
(mason.setup)
|
||||
|
||||
(when-let [mason-lspconfig (require :mason-lspconfig)]
|
||||
(mason-lspconfig.setup)
|
||||
(mason-lspconfig.setup_handlers {1 default-server-handler}))
|
||||
|
||||
(u.nnoremap :<leader>li :LspInfo)
|
||||
(nu.fn-bridge :LspExecuteCommand :dotfiles.plugin.lspconfig
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
(module dotfiles.plugin.mason
|
||||
{autoload {nvim aniseed.nvim mason mason mason-lspconf mason-lspconfig}})
|
||||
{autoload {a aniseed.core
|
||||
nvim aniseed.nvim mason mason mason-lspconf mason-lspconfig}})
|
||||
|
||||
(mason.setup {:ui {:icons {:package_installed "✓"}}})
|
||||
|
||||
(mason-lspconf.setup {:ensure_installed [:lua_ls]})
|
||||
(defn setup []
|
||||
(when mason
|
||||
(mason.setup {:ui {:icons {:package_installed "✓"}}})
|
||||
(when mason-lspconf
|
||||
(mason-lspconf.setup {:ensure_installed [:lua_ls]})
|
||||
(mason-lspconf.setup_handlers {1 default-server-handler}))))
|
||||
|
||||
Reference in New Issue
Block a user