mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-11-07 21:45:59 +01:00
29 lines
572 B
Nix
29 lines
572 B
Nix
{
|
|
pkgs,
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
with lib;
|
|
with builtins; let
|
|
cfg = config.vim.languages.markdown;
|
|
in {
|
|
config = mkIf cfg.enable (mkMerge [
|
|
(mkIf cfg.treesitter.enable {
|
|
vim.treesitter.enable = true;
|
|
vim.treesitter.grammars = [cfg.treesitter.package];
|
|
})
|
|
|
|
(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>
|
|
'';
|
|
})
|
|
]);
|
|
}
|