logoalt Hacker News

c-hendricksyesterday at 6:33 PM2 repliesview on HN

I unintentionally ran the main branch when testing some changes and a lot of my config broke (mostly around LSPs, CodeCompanion was much slower streaming its responses) so might wait a bit before upgrading.


Replies

edwinmbonyjrtoday at 12:35 AM

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

show 1 reply
vermilinguayesterday at 9:20 PM

The lspconfig depreciation was a very painful upgrade for me too, as it seems to be very poorly documented; but ultimately it came down to moving all of the LSP server configuration to `vim.lsp.config` blocks, then calling `vim.lsp.enable` with all the servers I use.

I’m still not clear on what Mason is doing in my config after the switch but oh well.

show 2 replies