nvf icon indicating copy to clipboard operation
nvf copied to clipboard

Option for setting lspconfig settings for lsp clients

Open Libadoxon opened this issue 11 months ago • 2 comments

⚠️ Please verify that this feature request has NOT been suggested before.

  • [x] I checked and didn't find a similar feature request

🏷️ Feature Type

API Additions

🔖 Feature description

Currently it seems impossible to set settings for lsps over nix. Worse even I think the only option for setting lsp settings is to disable the lsp in nix and then use lua to start it, but I might be wrong, my lua knowledge isn't particularly good

✔️ Solution

An option like vim.languages.<name>.lsp.settings or maybe even, if the language has multiple lsp clients something like vim.languages.<name>.lsp.<lsp-name>.settings. I might also be nice to expose other lspconfig things, like on_attach.

❓ Alternatives

No response

📝 Additional Context

No response

Libadoxon avatar Feb 16 '25 00:02 Libadoxon

This has been on my radar for a long while. I'd really like to redo the logic for language servers, but couldn't find the time to sit down and go over all language modules.

In theory it's not a very large change, currently LSP options are not exposed because they are inherited from variables in a let in block for each language. It should be somewhat trivial to move those into module options that can get merged. I'll try to take a look at this after Tuesday, but feel free to take a look at this if you'd like. If I do end up forgetting, also do feel free to remind me.

NotAShelf avatar Feb 16 '25 08:02 NotAShelf

I've started working on this in https://github.com/NotAShelf/nvf/pull/643. The API is reasonably simple, so converting most of the languages will be easy. Unfortunately I'm out of time for today, but I'll be going over it over this week.

NotAShelf avatar Feb 16 '25 09:02 NotAShelf