2024-04-16 02:51:46 +03:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
2024-05-10 02:39:22 +03:00
|
|
|
let cfg = config.local.programs.editors.neovim; in
|
2024-04-16 02:51:46 +03:00
|
|
|
{
|
|
|
|
options.local.programs.editors.neovim = with lib; {
|
|
|
|
enable = mkEnableOption "neovim";
|
|
|
|
defaultEditor = mkOption {
|
|
|
|
description = "set neovim as default editor";
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
|
|
|
};
|
|
|
|
ltex.enable = mkEnableOption "ltex language server";
|
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable (lib.mkMerge [
|
|
|
|
(lib.mkIf cfg.ltex.enable {
|
|
|
|
home.packages = [ pkgs.ltex-ls ];
|
|
|
|
})
|
|
|
|
|
|
|
|
(lib.mkIf cfg.defaultEditor {
|
|
|
|
home.sessionVariables.EDITOR = "nvim";
|
|
|
|
})
|
|
|
|
]);
|
|
|
|
}
|