fix neorg dependencies and nix syntax change in update

This commit is contained in:
megit 2024-08-07 16:40:14 +08:00
parent 47aa7eb7c5
commit 5dae59a42b

View file

@ -1,5 +1,17 @@
{ pkgs, pkgs-stable, ... }: { pkgs, pkgs-stable, ... }:
{ {
# https://github.com/nvim-neorg/neorg
# NOW neorg require lua-utils.nvim, nvim-nio, pathlib.vim
# https://github.com/nix-community/nixvim/issues/1395#issuecomment-2267262919
# Workaround
extraPlugins = [
(pkgs.vimUtils.buildVimPlugin { inherit (pkgs.luaPackages.lua-utils-nvim) pname version src; })
(pkgs.vimUtils.buildVimPlugin { inherit (pkgs.luaPackages.pathlib-nvim) pname version src; })
(pkgs.vimUtils.buildVimPlugin { inherit (pkgs.luaPackages.nvim-nio) pname version src; })
];
plugins = { plugins = {
neorg = { neorg = {
enable = true; enable = true;
@ -33,10 +45,10 @@
config = { config = {
default_keybinds = true; default_keybinds = true;
hook.__raw = '' hook.__raw = ''
function(keybinds) function(keybinds)
keybinds.unmap("norg", "i", "<M-CR>") keybinds.unmap("norg", "i", "<M-CR>")
keybinds.remap_event("norg", "i", "<S-CR>", "core.itero.next-iteration", "<CR>") keybinds.remap_event("norg", "i", "<S-CR>", "core.itero.next-iteration", "<CR>")
end end
''; '';
}; };
}; };