From d7f38b102cbab40ce3b112c22cf92ef799cf4e68 Mon Sep 17 00:00:00 2001 From: Muhammad Nauman Raza Date: Wed, 7 Feb 2024 18:01:42 +0000 Subject: [PATCH] feat: note search improvements via a keybind This keybind is in lua/core/neorg.lua --- lua/core/keybinds.lua | 1 + lua/core/neorg.lua | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lua/core/keybinds.lua b/lua/core/keybinds.lua index 52d2229..baa12ca 100644 --- a/lua/core/keybinds.lua +++ b/lua/core/keybinds.lua @@ -4,6 +4,7 @@ wk.register({ f = { name = "file", f = { "Telescope find_files", "Find File" }, + a = { "Telescope find_files hidden=true", "Find Hidden" }, g = { "Telescope live_grep", "Find Word" }, s = { ":w", "Write" }, w = { ":w!", "Force Write" }, diff --git a/lua/core/neorg.lua b/lua/core/neorg.lua index ac27128..429afc8 100644 --- a/lua/core/neorg.lua +++ b/lua/core/neorg.lua @@ -4,7 +4,7 @@ require("neorg").setup { ["core.dirman"] = { config = { workspaces = { - notes = "~/NAS/Neorg/Notes", + notes = "~/NAS/Documents/Neorg/", }, }, }, @@ -15,3 +15,13 @@ require("neorg").setup { }, }, } + +-- Keybinds +local wk = require("which-key") + +wk.register({ + n = { + name = "neorg", + p = { "Telescope find_files search_dir=~/NAS/Documents/Neorg cwd=" .. vim.fn.expand("%:p:h") .. " push", "Search for notes" }, + }, +}, { prefix = "" })