mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-10 01:04:34 +02:00
treewide: use mkWarnings where possible
This commit is contained in:
parent
abba4af10b
commit
12e658eca8
34 changed files with 309 additions and 225 deletions
|
@ -23,16 +23,18 @@ in
|
|||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
warnings =
|
||||
lib.optional (opt.disableTsServerFormatter.highestPrio == defaultPrio && 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.
|
||||
warnings = lib.nixvim.mkWarnings "plugins.none-ls.sources.formatting.prettier" {
|
||||
when = opt.disableTsServerFormatter.highestPrio == defaultPrio && ts-ls-cfg.enable;
|
||||
|
||||
- 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`.
|
||||
'';
|
||||
message = ''
|
||||
You have enabled the `prettier` formatter in none-ls.
|
||||
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
|
||||
`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 =
|
||||
lib.mkIf (cfg.enable && ts-ls-cfg.enable && cfg.disableTsServerFormatter)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue