mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-27 11:39:48 +01:00
20 lines
358 B
Nix
20 lines
358 B
Nix
{
|
|
pkgs,
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
with lib; let
|
|
cfg = config.vim.markdown.glow;
|
|
in {
|
|
config = (mkIf cfg.enable) {
|
|
vim.startPlugins = ["glow-nvim"];
|
|
vim.globals = {
|
|
"glow_binary_path" = "${pkgs.glow}/bin";
|
|
};
|
|
|
|
vim.configRC.glow = nvim.dag.entryAnywhere ''
|
|
autocmd FileType markdown noremap <leader>p :Glow<CR>
|
|
'';
|
|
};
|
|
}
|