fix: disable Conform for Rust if we have rust-analyzer enabled

This commit is contained in:
Christoph Koehler 2025-05-15 11:36:15 -06:00
commit 37aac45396
No known key found for this signature in database
2 changed files with 11 additions and 2 deletions

View file

@ -7,7 +7,7 @@
inherit (builtins) attrNames;
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.options) mkOption mkEnableOption literalMD;
inherit (lib.strings) optionalString;
inherit (lib.trivial) boolToString;
inherit (lib.lists) isList;
@ -68,7 +68,14 @@ in {
};
format = {
enable = mkEnableOption "Rust formatting" // {default = config.vim.languages.enableFormat;};
enable =
mkEnableOption "Rust formatting"
// {
default = !cfg.lsp.enable && config.vim.languages.enableFormat;
defaultText = literalMD ''
Disabled if Rust LSP is enabled, otherwise follows {option}`vim.languages.enableFormat`
'';
};
type = mkOption {
description = "Rust formatter to use";