From 77e62827b1b37b2000d07c0826e3b2b8917972f1 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sat, 23 Nov 2024 13:19:39 +0100 Subject: fix(modules/nvim/plgs/neorg): Move keybind setup to separate ftplugin --- .../by-name/nv/nvim/plgs/neorg/key_mappings.lua | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 modules/by-name/nv/nvim/plgs/neorg/key_mappings.lua (limited to 'modules/by-name/nv/nvim/plgs/neorg/key_mappings.lua') diff --git a/modules/by-name/nv/nvim/plgs/neorg/key_mappings.lua b/modules/by-name/nv/nvim/plgs/neorg/key_mappings.lua new file mode 100644 index 00000000..e2ebb653 --- /dev/null +++ b/modules/by-name/nv/nvim/plgs/neorg/key_mappings.lua @@ -0,0 +1,30 @@ +-- Override some of my default key mappings to better integrate into neorg. +-- They still to the same conceptual thing. + +-- Femaco does the same outside of neorg, so map looking-glass the same key. +vim.keymap.set( + "n", + "cc", + "(neorg.looking-glass.magnify-code-block)", + { noremap = true, silent = true, desc = "Edit code block" } +) +vim.keymap.set( + "n", + "", + "(neorg.esupports.hop.hop-link)", + { noremap = true, silent = true, desc = "Follow link" } +) +vim.keymap.set( + "n", + "", + "(core.integrations.telescope.find_linkable)", + { noremap = true, silent = true, desc = "Find possible links" } +) +vim.keymap.set( + "i", + "", + "(core.integrations.telescope.insert_link)", + { noremap = true, silent = true, desc = "Insert a link" } +) + +-- action = "gf", key = "", mode = { "n" }, options = { desc = "open file/url under cursor" } }, -- cgit 1.4.1