2024-09-12 23:37:22 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.programs.neovide;
|
|
|
|
settingsFormat = pkgs.formats.toml { };
|
|
|
|
|
|
|
|
in {
|
|
|
|
meta.maintainers = [ lib.hm.maintainers.NitroSniper ];
|
|
|
|
|
|
|
|
options.programs.neovide = {
|
|
|
|
enable = lib.mkEnableOption "Neovide, No Nonsense Neovim Client in Rust";
|
|
|
|
|
2025-03-07 18:17:52 -06:00
|
|
|
package = lib.mkPackageOption pkgs "neovide" { nullable = true; };
|
2024-09-12 23:37:22 +01:00
|
|
|
|
|
|
|
settings = lib.mkOption {
|
|
|
|
type = settingsFormat.type;
|
|
|
|
example = lib.literalExpression ''
|
|
|
|
{
|
|
|
|
fork = false;
|
|
|
|
frame = "full";
|
|
|
|
idle = true;
|
|
|
|
maximized = false;
|
|
|
|
neovim-bin = "/usr/bin/nvim";
|
|
|
|
no-multigrid = false;
|
|
|
|
srgb = false;
|
|
|
|
tabs = true;
|
|
|
|
theme = "auto";
|
|
|
|
title-hidden = true;
|
|
|
|
vsync = true;
|
|
|
|
wsl = false;
|
|
|
|
|
|
|
|
font = {
|
|
|
|
normal = [];
|
|
|
|
size = 14.0;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
description = ''
|
|
|
|
Neovide configuration.
|
|
|
|
For available settings see <https://neovide.dev/config-file.html>.
|
|
|
|
For any option not found will need to be done in your neovim's config instead.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
2025-03-07 18:17:52 -06:00
|
|
|
home.packages = lib.mkIf (cfg.package != null) [ cfg.package ];
|
2024-09-12 23:37:22 +01:00
|
|
|
xdg.configFile."neovide/config.toml".source =
|
|
|
|
settingsFormat.generate "config.toml" cfg.settings;
|
|
|
|
};
|
|
|
|
}
|