fix(lsp): stop dropping LSP plugins on a cold clone
This file required configs.lspconfig at spec-import time, which pulls in nvchad.configs.lspconfig. On a fresh clone NvChad is not installed yet, so the import threw and lazy skipped every spec below it — rustaceanvim, typescript-tools, actions-preview, nui and lsp-endhints were all missing until the second launch. Verified against a wiped profile. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+8
-6
@@ -1,12 +1,11 @@
|
||||
local configs = require "configs.lspconfig"
|
||||
|
||||
vim.g.rustaceanvim = configs.rustacean
|
||||
|
||||
-- configs.lspconfig pulls in nvchad.configs.lspconfig, which does not exist until
|
||||
-- NvChad is installed. Requiring it at spec-import time makes this whole file fail
|
||||
-- on a cold clone, silently dropping every LSP plugin below from the first launch.
|
||||
return {
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
configs.defaults()
|
||||
require("configs.lspconfig").defaults()
|
||||
end,
|
||||
},
|
||||
|
||||
@@ -14,6 +13,9 @@ return {
|
||||
"mrcjkb/rustaceanvim",
|
||||
version = "^6",
|
||||
lazy = false,
|
||||
init = function()
|
||||
vim.g.rustaceanvim = require("configs.lspconfig").rustacean
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
@@ -21,7 +23,7 @@ return {
|
||||
ft = { "typescript", "typescriptreact" },
|
||||
dependencies = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" },
|
||||
config = function()
|
||||
require("typescript-tools").setup(configs.typescript)
|
||||
require("typescript-tools").setup(require("configs.lspconfig").typescript)
|
||||
end,
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user