I had the same issue with LSPs. If you have LSP configurations in a dedicated lsp directory all you need to do is instead of calling this:
vim.lsp.config(<lsp server>, config)
just return the config as a table i.e
vim.lsp.config("emmet_ls", {
filetypes = {
"html",
"css",
"sass",
"scss",
"less",
"svelte",
"gotmpl",
},
})
will become
return {
filetypes = {
"html",
"css",
"sass",
"scss",
"less",
"svelte",
"gotmpl",
},
}
in lsp/emmet_ls.lua - file name is very important btw