From 3c7c0e1e870c40c360b49230c8b408b719fec46a Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 30 Jan 2025 22:25:53 +0100 Subject: [PATCH] nvim: Do not hide away html comments in md files Why would I want to completely hide comments I left for myself. --- nvim/.config/nvim/lua/plugins/prose.lua | 26 ++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/nvim/.config/nvim/lua/plugins/prose.lua b/nvim/.config/nvim/lua/plugins/prose.lua index 602954f..98c2b3b 100644 --- a/nvim/.config/nvim/lua/plugins/prose.lua +++ b/nvim/.config/nvim/lua/plugins/prose.lua @@ -81,6 +81,11 @@ local prose_plugs = { removed = { raw = "[_]", rendered = "󱋭 ", highlight = "RenderMarkdownTodo" }, }, }, + html = { + comment = { + conceal = false, + }, + }, }, name = "render-markdown", -- Only needed if you have another plugin named markdown.nvim dependencies = { @@ -146,7 +151,7 @@ local prose_plugs = { -- bring zettelkasten commands { - "mickael-menu/zk-nvim", + "zk-org/zk-nvim", config = function() if require("core.util").is_available("which-key") then require("which-key").add({ @@ -159,6 +164,24 @@ local prose_plugs = { opts = vim.tbl_extend("force", { orphan = true }, opts or {}) require("zk").edit(opts, { title = "Zk Orphans" }) end) + require("zk.commands").add("ZkGrep", function(opts) + local collection = {} + local list_opts = { select = { "title", "path", "absPath" } } + require("zk.api").list(vim.env.ZK_NOTEBOOK_DIR, list_opts, function(_, notes) + for _, note in ipairs(notes) do + collection[note.absPath] = note.title or note.path + end + end) + local options = vim.tbl_deep_extend("force", { + prompt_title = "Notes", + search_dirs = { vim.env.ZK_NOTEBOOK_DIR }, + disable_coordinates = true, + path_display = function(_, path) + return collection[path] + end, + }, opts or {}) + require("telescope.builtin").live_grep(options) + end) end require("zk").setup({ picker = "telescope", @@ -199,6 +222,7 @@ local prose_plugs = { desc = "note search", }, { "nf", "ZkMatch", desc = "find note from selection", mode = "v" }, + { "nw", "ZkGrep", desc = "grep notes" }, { "nt", "ZkTags", desc = "note tags" }, { "nc", "ZkCd", desc = "notedir cd" }, { "no", "ZkOrphans { sort = { 'modified' } }", desc = "orphans list" },