about summary refs log tree commit diff stats
path: root/modules/by-name/nv/nvim/plgs/neorg/key_mappings.lua
blob: 5391bf0b3c87e6c2166352372e1e9d5869f7f5da (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
-- nixos-config - My current NixOS configuration
--
-- Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
-- SPDX-License-Identifier: GPL-3.0-or-later
--
-- This file is part of my nixos-config.
--
-- You should have received a copy of the License along with this program.
-- If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.

-- 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" } },