Checklist
Neovim version (nvim -v)
v0.12.2 RelWithDebInfo
Operating system/version
ArchLinux
Terminal/GUI
ghostty
Describe the bug
In the vim.lsp.config the on_new_config is still not supported. Issue ref - neovim/neovim#32287
So whenever I open the package.json, pnpm-workspace.yaml file I get no auto-completion by default.
Steps to Reproduce
- clone the AstroNvim starter
- Add the following in
community.lua
---@type LazySpec
return {
"AstroNvim/astrocommunity",
{ import = "astrocommunity.pack.json" },
{ import = "astrocommunity.pack.yaml" },
}
- Open package.json or pnpm-workspace.yaml file, no auto-completion is observed
Expected behavior
Auto-completion should be working.
Please use before_init instead of on_new_config(same as lazyvim)
before_init = function(_, config)
--- ...
end
Screenshots
No response
Additional Context
No response
Minimal configuration
-- save as repro.lua
-- run with nvim -u repro.lua
-- DO NOT change the paths
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "runtime", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
-- stylua: ignore
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
-- install plugins
local plugins = {
{ "AstroNvim/AstroNvim", import = "astronvim.plugins" },
{ "AstroNvim/astrocommunity", { import = "astrocommunity.pack.json" }, { import = "astrocommunity.pack.yaml" } },
-- add any other plugins/customizations here
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
-- add anything else here (autocommands, vim.filetype, etc.)
Checklist
repro.luaprovided belowNeovim version (nvim -v)
v0.12.2 RelWithDebInfo
Operating system/version
ArchLinux
Terminal/GUI
ghostty
Describe the bug
In the
vim.lsp.configtheon_new_configis still not supported. Issue ref - neovim/neovim#32287So whenever I open the package.json, pnpm-workspace.yaml file I get no auto-completion by default.
Steps to Reproduce
community.luaExpected behavior
Auto-completion should be working.
Please use
before_initinstead of on_new_config(same as lazyvim)Screenshots
No response
Additional Context
No response
Minimal configuration