From c0c5d5611dd176acf15e7469c88c5e899628f4f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Mon, 23 Jun 2025 02:16:57 +0200 Subject: [PATCH] feat(nvim): obsidian extra disables ui and has new keymaps The new keymaps lets me search for unfinished and finished tasks --- .../plugins/extras/editor/docs/obsidian.lua | 41 ++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/.config/nvim/lua/plugins/extras/editor/docs/obsidian.lua b/.config/nvim/lua/plugins/extras/editor/docs/obsidian.lua index 3fdb3698..b389b432 100644 --- a/.config/nvim/lua/plugins/extras/editor/docs/obsidian.lua +++ b/.config/nvim/lua/plugins/extras/editor/docs/obsidian.lua @@ -47,6 +47,8 @@ return { blink = true, }, + create_new = false, + picker = { name = "snacks.pick", note_mappings = { @@ -122,7 +124,7 @@ return { img_folder = "00 - Data/Documentos", }, - ui = { enable = true }, + ui = { enable = false }, statusline = { enabled = true, @@ -130,6 +132,43 @@ return { }, }, }, + { + "folke/snacks.nvim", + keys = { + { + prefix .. "k", + function() + Snacks.picker.grep({ + search = "^\\s*- \\[ \\]", + regex = true, + dirs = { vim.fn.getcwd() }, + finder = "grep", + format = "file", + show_empty = true, + supports_live = false, + live = false, + }) + end, + desc = "Tasks (Unfinished)", + }, + { + prefix .. "K", + function() + Snacks.picker.grep({ + search = "^\\s*- \\[x\\]:", + regex = true, + dirs = { vim.fn.getcwd() }, + finder = "grep", + format = "file", + show_empty = true, + supports_live = false, + live = false, + }) + end, + desc = "Tasks (Finished)", + }, + }, + }, { "folke/which-key.nvim", opts = {