plugins/lsp: Use the auto-generated lsp plugin list

This commit is contained in:
Quentin Boyer 2024-10-05 15:55:49 +02:00
parent c79bfb75da
commit 8e8d9afe8e
11 changed files with 172 additions and 679 deletions

View file

@ -1,14 +1,14 @@
{ lib, config, ... }:
let
cfg = config.plugins.none-ls.sources.formatting.prettier;
ts-ls-cfg = config.plugins.lsp.servers.ts-ls;
ts-ls-cfg = config.plugins.lsp.servers.ts_ls;
in
{
options.plugins.none-ls.sources.formatting.prettier = {
disableTsServerFormatter = lib.mkOption {
type = with lib.types; nullOr bool;
description = ''
Disables the formatting capability of the `ts-ls` language server if it is enabled.
Disables the formatting capability of the `ts_ls` language server if it is enabled.
'';
default = null;
example = true;
@ -18,14 +18,14 @@ in
config = lib.mkIf cfg.enable {
warnings = lib.optional ((cfg.disableTsServerFormatter == null) && ts-ls-cfg.enable) ''
You have enabled the `prettier` formatter in none-ls.
You have also enabled the `ts-ls` language server which also brings a formatting feature.
You have also enabled the `ts_ls` language server which also brings a formatting feature.
- To disable the formatter built-in the `ts-ls` language server, set
- To disable the formatter built-in the `ts_ls` language server, set
`plugins.none-ls.sources.formatting.prettier.disableTsServerFormatter` to `true`.
- Else, to silence this warning, explicitly set the option to `false`.
'';
plugins.lsp.servers.ts-ls =
plugins.lsp.servers.ts_ls =
lib.mkIf
(
cfg.enable