-
-
Notifications
You must be signed in to change notification settings - Fork 191
languages: expose low-level API; convert existing modules #801
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
Conversation
|
@NotAShelf I was wondering about submitting a PR adding In any case, should I wait until you get this PR merged before working on it, or start the work based on this branch? Tks! |
Sorry for not replying earlier @thamenato , I completely missed your comment somehow. |
|
Hi @NotAShelf, I've started reviewing the details of this ticket, and I wanted to clarify a few points regarding the current state of the core API. I had some questions about the API design and configuration intent that I'd appreciate your input on. Questions on lsp.settingsCould you clarify where the API Design ClarificationsIs the intention of this ticket to define a fixed set of supported LSPs that users cannot customize? From the current implementation, it appears the user cannot define their own server. If I'm interpreting the design correctly, the envisioned usage looks something like: languages.rust = {
enable = true;
server = ["rust-analyzer" "anotherLSP"];
};While I understand the intent to simplify configuration, this approach seems quite restrictive. Do you foresee the ability to configure LSPs in a more flexible way in the future? When I initially started exploring this ticket, I had imagined something closer to: languages.*.server = mkOption {
type = listOf (attrNames lspOptions);
};I think a compromise between the two approaches could also work: type = listOf oneOf [
(attrNames lspOptions)
(attrNames servers)
];That said, I also understand this might not align with the core principles of nvf configuration. Would appreciate your thoughts on whether more flexibility is in scope or if the current direction is intentional. Thanks! |
|
this PR is superseded by #860 the new implementation uses neovim 0.11's |
|
✅ Preview has been deleted successfully! |
Based on the feedback collected from #748, and other online spaces, this pull request exposes a low-level
vim.lsp.serversAPI that will be consumed internally by language modules, in a way that allows no-overhead LSP setups for both this project and end-user setups. This is, in short, the long-awaited language moduler refactor.The new API can also be used to override LSP options set by language modules, on top of setting up LSPs not supported directly by nvf. In addition, the language modules now take a list of servers to allow supporting multiple servers with ease (relevant: #575)
Modules not converted:
Breaking Changes
vim.languages.rust.crates.enablehas been renamed tovim.languages.rust.extensions.crates-nvim.enable