Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option for setting lspconfig settings for lsp clients #642

Open
1 task done
Libadoxon opened this issue Feb 16, 2025 · 2 comments
Open
1 task done

Option for setting lspconfig settings for lsp clients #642

Libadoxon opened this issue Feb 16, 2025 · 2 comments

Comments

@Libadoxon
Copy link
Contributor

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

  • 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

@NotAShelf
Copy link
Owner

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
Copy link
Owner

I've started working on this in #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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants