about summary refs log tree commit diff stats
path: root/modules/by-name/nv/nvim/plgs/neorg/key_mappings.lua
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-11-23 13:19:39 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-11-23 13:22:08 +0100
commit77e62827b1b37b2000d07c0826e3b2b8917972f1 (patch)
tree56f25ba299f78adb8c8532a2e37a12f47239fe36 /modules/by-name/nv/nvim/plgs/neorg/key_mappings.lua
parentrefactor(modules/nvim/files): Move to their respective plugin (diff)
downloadnixos-config-77e62827b1b37b2000d07c0826e3b2b8917972f1.tar.gz
nixos-config-77e62827b1b37b2000d07c0826e3b2b8917972f1.zip
fix(modules/nvim/plgs/neorg): Move keybind setup to separate ftplugin
Diffstat (limited to 'modules/by-name/nv/nvim/plgs/neorg/key_mappings.lua')
-rw-r--r--modules/by-name/nv/nvim/plgs/neorg/key_mappings.lua30
1 files changed, 30 insertions, 0 deletions
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",
+  "<Leader>cc",
+  "<Plug>(neorg.looking-glass.magnify-code-block)",
+  { noremap = true, silent = true, desc = "Edit code block" }
+)
+vim.keymap.set(
+  "n",
+  "<Enter>",
+  "<Plug>(neorg.esupports.hop.hop-link)",
+  { noremap = true, silent = true, desc = "Follow link" }
+)
+vim.keymap.set(
+  "n",
+  "<C-s>",
+  "<Plug>(core.integrations.telescope.find_linkable)",
+  { noremap = true, silent = true, desc = "Find possible links" }
+)
+vim.keymap.set(
+  "i",
+  "<C-i>",
+  "<Plug>(core.integrations.telescope.insert_link)",
+  { noremap = true, silent = true, desc = "Insert a link" }
+)
+
+-- action = "gf", key = "<Enter>", mode = { "n" }, options = { desc = "open file/url under cursor" } },