utility/leetcode.nvim: Clean Code

Cleaned code upon PR review comments
This commit is contained in:
army castillo 2025-02-15 15:30:26 -05:00
commit c5e5ee0c68

View file

@ -9,8 +9,8 @@ in {
enable = mkEnableOption "complementary neovim plugin for leetcode.nvim"; enable = mkEnableOption "complementary neovim plugin for leetcode.nvim";
setupOpts = mkPluginSetupOption "leetcode-nvim" { setupOpts = mkPluginSetupOption "leetcode-nvim" {
logging = mkEnableOption "Whether to log leetcode.nvim status notifications." // { default = true; }; logging = mkEnableOption "logging for leetcode.nvim status notifications." // {default = true;};
image_support = mkEnableOption "Whether to render question description images using image.nvim (image-nvim must be enabled)." // { default = false; }; image_support = mkEnableOption "question description images using image.nvim (image-nvim must be enabled).";
lang = mkOption { lang = mkOption {
type = enum [ type = enum [
@ -46,18 +46,9 @@ in {
}; };
cn = { cn = {
enabled = mkEnableOption "Enable leetcode.cn instead of leetcode.com" // { default = false; }; enabled = mkEnableOption "leetcode.cn instead of leetcode.com";
translator = mkOption { translator = mkEnableOption "translator" // {default = true;};
type = bool; translate_problems = mkEnableOption "translation for problem questions" // {default = true;};
default = true;
description = "Enable translator";
};
translate_problems = mkOption {
type = bool;
default = true;
description = "Enable translation for problem questions";
};
}; };
storage = { storage = {
@ -75,7 +66,7 @@ in {
}; };
plugins = { plugins = {
non_standalone = mkEnableOption "To run leetcode.nvim in a non-standalone mode" // { default = false; }; non_standalone = mkEnableOption "leetcode.nvim in a non-standalone mode";
}; };
}; };
}; };