mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-30 23:55:15 +02:00
plugins/lsp: rename tsserver to ts-ls
This commit is contained in:
parent
95b322a522
commit
2e3083e425
3 changed files with 23 additions and 9 deletions
|
@ -2,14 +2,14 @@
|
|||
with lib;
|
||||
let
|
||||
cfg = config.plugins.none-ls.sources.formatting.prettier;
|
||||
tsserver-cfg = config.plugins.lsp.servers.tsserver;
|
||||
ts-ls-cfg = config.plugins.lsp.servers.ts-ls;
|
||||
in
|
||||
{
|
||||
options.plugins.none-ls.sources.formatting.prettier = {
|
||||
disableTsServerFormatter = mkOption {
|
||||
type = with types; nullOr bool;
|
||||
description = ''
|
||||
Disables the formatting capability of the `tsserver` language server if it is enabled.
|
||||
Disables the formatting capability of the `ts-ls` language server if it is enabled.
|
||||
'';
|
||||
default = null;
|
||||
example = true;
|
||||
|
@ -17,20 +17,20 @@ in
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
warnings = optional ((cfg.disableTsServerFormatter == null) && tsserver-cfg.enable) ''
|
||||
warnings = optional ((cfg.disableTsServerFormatter == null) && ts-ls-cfg.enable) ''
|
||||
You have enabled the `prettier` formatter in none-ls.
|
||||
You have also enabled the `tsserver` 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 `tsserver` 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.tsserver =
|
||||
plugins.lsp.servers.ts-ls =
|
||||
mkIf
|
||||
(
|
||||
cfg.enable
|
||||
&& tsserver-cfg.enable
|
||||
&& ts-ls-cfg.enable
|
||||
&& (isBool cfg.disableTsServerFormatter)
|
||||
&& cfg.disableTsServerFormatter
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue