From 9a59b7bff5e31e69db5813ec8f0ee02e7203e2b1 Mon Sep 17 00:00:00 2001 From: Archie Fox Date: Fri, 15 Aug 2025 14:00:44 +0300 Subject: [PATCH] Fix settings Neorg --- lua/config/keymaps.lua | 18 ++++++++---------- lua/plugins/neorg.lua | 7 +++++++ 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua index 26fc8e3..07fe7e3 100644 --- a/lua/config/keymaps.lua +++ b/lua/config/keymaps.lua @@ -55,15 +55,13 @@ k.set("v", "", ":m '<-2gv=gv", { desc = "Move selection up" }) k.set("v", "<", "", ">gv", { desc = "Indent right and reselect" }) -vim.keymap.set("n", "gg", function() - vim.api.nvim_win_set_cursor(0, { 1, 0 }) -end, { desc = "Go to first line" }) - -vim.keymap.set("n", "G", function() - local line_count = vim.api.nvim_buf_line_count(0) - vim.api.nvim_win_set_cursor(0, { line_count, 0 }) -end, { desc = "Go to last line" }) - -k.set("n", "\\", "(neorg.qol.todo-items.todo.task-cycle)", { desc = "Cycle done-undone task in Neorg" }) +-- Keys for Neorg k.set("n", "\\jt", ":Neorg journal today", { desc = "Create Neorg Journal note today" }) k.set("n", "\\jc", ":Neorg journal custom", { desc = "Create Neorg Journal note custom" }) +k.set("n", "\\", "(neorg.qol.todo-items.todo.task-cycle)", { desc = "Cycle done-undone task in Neorg" }) +vim.api.nvim_create_autocmd("Filetype", { + pattern = "norg", + callback = function() + vim.keymap.set("n", "", "(neorg.esupports.hop.hop-link)", { buffer = true }) + end, +}) diff --git a/lua/plugins/neorg.lua b/lua/plugins/neorg.lua index 5282de8..750e585 100644 --- a/lua/plugins/neorg.lua +++ b/lua/plugins/neorg.lua @@ -29,6 +29,13 @@ return { create_todo_parents = true, }, }, + ["core.qol.toc"] = { + config = { + auto_toc = { + open = true, + }, + }, + }, }, }) end,