Open tacolegs2004 opened 6 months ago
The reason that LazyVim is quitting on start is that lazy.nvim is running quick-lint-js's test suite. (The test suite script exits when tests pass.)
Why does lazy.nvim run the test suite? Because lazy.nvim isn't respecting the rtp
setting (which doesn't seem to exist; lazy.nvim always adds the whole Git repo to runtimepath
) and because lazy.nvim recursively executes .vim files in quick-lint-js's plugin
directory.
lazy.nvim's config
hook runs after executing the .vim files, so we can't stop this behavior using a config
hook. The cond
hook does happen early enough, though, so we can exploit it to get lazy.nvim to not totally explode:
return {
"quick-lint/quick-lint-js",
tag = "3.1.0",
cond = function(plugin)
-- TODO(strager): Don't make this happen multiple times.
plugin.dir = plugin.dir .. "/plugin/vim/quick-lint-js.vim"
return true
end
}
But this doesn't make quick-lint-js work yet. More investigation is needed.
Here's a partially-working config for LazyVim:
return {
"quick-lint/quick-lint-js",
tag = "3.1.0",
cond = function(plugin)
-- TODO(strager): Don't make this happen multiple times.
plugin.dir = plugin.dir .. "/plugin/vim/quick-lint-js.vim"
return true
end,
config = function(_plugin)
require("lspconfig/quick_lint_js").setup {}
end,
}
I filed an issue with lazy.nvim. https://github.com/folke/lazy.nvim/issues/1319
I tried to add the plugin to my LazyVim config. However, once I added the following code to my config through a file called 'quick-lint-js.lua', whenever I ran 'nvim' in my terminal, Neovim simply wouldn't open.
EDIT: I converted the packer.nvim snippet from here to a LazyVim return.