mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-23 13:50:44 +00:00
31 lines
617 B
Nix
31 lines
617 B
Nix
{
|
|
pkgs,
|
|
config,
|
|
lib,
|
|
...
|
|
}: let
|
|
inherit (lib) nvim mkIf mkMerge;
|
|
|
|
cfg = config.vim.languages.markdown;
|
|
in {
|
|
config = mkIf cfg.enable (mkMerge [
|
|
(mkIf cfg.treesitter.enable {
|
|
vim.treesitter.enable = true;
|
|
|
|
vim.treesitter.grammars = [cfg.treesitter.mdPackage cfg.treesitter.mdInlinePackage];
|
|
})
|
|
|
|
(mkIf cfg.glow.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>
|
|
'';
|
|
})
|
|
]);
|
|
}
|