From 444676caaca4043ece7e8528dcaa0c72f2ea9bda Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 2 Oct 2023 20:06:56 +0200 Subject: [PATCH] nvim: Add markmap to build mindmaps Added markmap plugin to make mindmaps from markdown. Uses headings for leaves, and works pretty automatically. Testing its functionality longer-term for now. --- nvim/.config/nvim/lua/plugins/prose.lua | 41 +++++++++++++++++-------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/nvim/.config/nvim/lua/plugins/prose.lua b/nvim/.config/nvim/lua/plugins/prose.lua index 9654baa..3c28be9 100644 --- a/nvim/.config/nvim/lua/plugins/prose.lua +++ b/nvim/.config/nvim/lua/plugins/prose.lua @@ -1,6 +1,6 @@ local writing_ft = { "quarto", "pandoc", "markdown", "text", "tex" } -return { +local prose_plugs = { -- UI improvements -- provide distraction free writing { "folke/zen-mode.nvim", config = true, event = "VeryLazy" }, @@ -12,10 +12,10 @@ return { require("wrapping").setup({ create_keymappings = false, notify_on_switch = false, - softener = { markdown = true, text = true, asciidoc = true } + softener = { markdown = true, text = true, asciidoc = true }, }) end, - lazy = false + lazy = false, }, -- displays prettier headlines mimicking the ones in emacs orgmode { @@ -60,14 +60,29 @@ return { -- syntax highlighting for markdown criticmarkup (comments, additions, ...) { "vim-pandoc/vim-criticmarkup", ft = writing_ft }, - -- inline display of latex formulas - -- TODO always demands latex treesitter to be installed even if it is - -- TODO always turns softwrapped lines off on exiting insert mode - --{ - --"jbyuki/nabla.nvim", - --ft = writing_ft, - --config = function() - --require("nabla").enable_virt({ autogen = true, silent = true }) - --end, - --}, + + -- create mindmaps from your markdown + { + "Zeioth/markmap.nvim", + cmd = { "MarkmapOpen", "MarkmapSave", "MarkmapWatch", "MarkmapWatchStop" }, + config = true, + }, + + -- cite as you write from papis databases + -- ADDITIONAL DEPENDENCIES: papis and yq in shell env + -- { + -- "jghauser/papis.nvim", + -- cond = vim.fn.executable("papis") == 1 and vim.fn.executable("yq") == 1, + -- ft = writing_ft, + -- dependencies = { + -- "kkharji/sqlite.lua", + -- "nvim-lua/plenary.nvim", + -- "MunifTanjim/nui.nvim", + -- "nvim-treesitter/nvim-treesitter", + -- }, + -- lazy = false, + -- config = true, + -- } } + +return prose_plugs