fix neorg and add treesitter

This commit is contained in:
megit 2024-04-08 20:01:57 +08:00
parent c24150153f
commit 1e6312d181
3 changed files with 26 additions and 6 deletions

View file

@ -21,6 +21,7 @@
./plugins/which-key.nix ./plugins/which-key.nix
./plugins/telescope.nix ./plugins/telescope.nix
./plugins/neorg.nix ./plugins/neorg.nix
./plugins/treesitter.nix
./plugins/lsp/lsp.nix ./plugins/lsp/lsp.nix

View file

@ -34,12 +34,15 @@
}; };
"core.keybinds" = { "core.keybinds" = {
config = { config = {
hook = function(keybinds) hook = {
# -- unmap Alt-Enter to "core.itero.next-iteration", "<CR>" __raw = ''function(keybinds)
-- unmap Alt-Enter to "core.itero.next-iteration", "<CR>"
keybinds.unmap("norg", "i", "<M-CR>") keybinds.unmap("norg", "i", "<M-CR>")
# -- map Shift-Enter to "core.itero.next-iteration", "<CR>" -- map Shift-Enter to "core.itero.next-iteration", "<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;
'';
};
}; };
}; };
}; };

View file

@ -0,0 +1,16 @@
{
plugins = {
treesitter = {
enable = true;
incrementalSelection = {
enable = true;
keymaps = {
initSelection = "g<space><space>";
nodeIncremental = "g<space><space>";
scopeIncremental = "<c-s>";
nodeDecremental = "g<space>m";
};
};
};
};
}