unison icon indicating copy to clipboard operation
unison copied to clipboard

Update Unison lspconfig for Nvim

Open sneekyfoxx opened this issue 3 weeks ago • 4 comments

UCM uses Nvim's outdated lspconfig leading to errors in the editor. The new syntax is vim.lsp.config('unison', {}) which doesn't work but require('lspconfig')['unison'].setup({}) does.

sneekyfoxx avatar Dec 03 '25 11:12 sneekyfoxx

@sneekyfoxx could you say more about where this outdated lspconfig is? I wouldn't expect UCM to be using any Nvim config.

ceedubs avatar Dec 04 '25 18:12 ceedubs

I'm sorry. I'm speaking about the lspconfig configuration for Unison in Neovim located at: https://github.com/unisonweb/unison/blob/trunk/docs%2Flanguage-server.markdown

For some reason it doesn't work using the lspconfig-0.11 syntax: vim.lsp.config('unison', {})

It only works using the old lsconfig syntax which is deprecated: require('lspconfig')['unison'].setup({})

sneekyfoxx avatar Dec 04 '25 19:12 sneekyfoxx

Thanks for bringing this to attention.

For me with a recent neovim and lspconfig it seems that I only need the following and it works fine:

vim.lsp.enable({'unison'})

It seems to pick up the right config from lspconfig. That doesn't work for you @sneekyfoxx?

ceedubs avatar Dec 05 '25 16:12 ceedubs

@ceedubs vim.lsp.enable('unison') does work for me. I realized that by using the lazy.nvim config without lsconfig, it works better. Thank you for your reply!

sneekyfoxx avatar Dec 05 '25 17:12 sneekyfoxx