utility/preview: cleanup and optionalString

This commit is contained in:
Donnerinoern 2024-02-13 15:45:47 +01:00
commit 2e07763149
7 changed files with 11 additions and 11 deletions

View file

@ -16,13 +16,13 @@ in {
vim.startPlugins = ["glow-nvim"];
vim.maps.normal = mkMerge [
(mkBinding cfg.glow.mappings.openPreview ":Glow<CR>" mappings.openPreview.description)
(mkBinding cfg.mappings.openPreview ":Glow<CR>" mappings.openPreview.description)
];
vim.luaConfigRC.glow = nvim.dag.entryAnywhere ''
require('glow').setup({
glow_path = "${pkgs.glow}/bin/glow"
});
glow_path = "${pkgs.glow}/bin/glow"
});
'';
};
}

View file

@ -1,4 +1,4 @@
_: {
{
imports = [
./glow.nix
./config.nix

View file

@ -3,7 +3,7 @@
in {
options.vim.utility.preview = {
glow = {
enable = mkEnableOption "enable markdown preview in neovim with glow";
enable = mkEnableOption "markdown preview in neovim with glow";
mappings = {
openPreview = mkMappingOption "Open preview" "<leader>p";
};