mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-27 02:59:00 +02:00
Add a new option (and warning) to disable the typescript-language-server (ts_ls) formatting the same as for prettier.
25 lines
610 B
Nix
25 lines
610 B
Nix
{ config, lib, ... }:
|
|
let
|
|
noneLsBuiltins = import ../../../generated/none-ls.nix;
|
|
mkSourcePlugin = import ./_mk-source-plugin.nix;
|
|
in
|
|
{
|
|
imports =
|
|
[
|
|
./prettier.nix
|
|
./prettierd.nix
|
|
]
|
|
++ (lib.flatten (
|
|
lib.mapAttrsToList (category: (lib.map (mkSourcePlugin category))) noneLsBuiltins
|
|
));
|
|
|
|
config =
|
|
let
|
|
cfg = config.plugins.none-ls;
|
|
gitsignsEnabled = cfg.sources.code_actions.gitsigns.enable;
|
|
in
|
|
lib.mkIf cfg.enable {
|
|
# Enable gitsigns if the gitsigns source is enabled
|
|
plugins.gitsigns.enable = lib.mkIf gitsignsEnabled true;
|
|
};
|
|
}
|