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