From eaec2b80ca76e5887c6948820da07d5f640e13e3 Mon Sep 17 00:00:00 2001 From: Pkoenig2 Date: Wed, 15 Jul 2026 20:02:38 -0700 Subject: [PATCH] updates to md files handling Added more comprehensive markdown files handling. Next will add support for spellchecking --- init.lua | 126 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 125 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 1072b031..c214ac57 100644 --- a/init.lua +++ b/init.lua @@ -100,7 +100,7 @@ do -- Set to true if you have a Nerd Font installed and selected in the terminal vim.g.have_nerd_font = true - + vim.g.python3_host_prog = vim.fn.exepath("python") -- [[ Setting options ]] -- See `:help vim.o` -- NOTE: You can change these options as you wish! @@ -279,6 +279,130 @@ do -- In this section we set up some autocommands to run build -- steps for certain plugins after they are installed or updated. + vim.pack.add{ + { + src = "https://github.com/obsidian-nvim/obsidian.nvim", + version = vim.version.range "*", -- use latest release, remove to use latest commit + }, + } + require("obsidian").setup { + legacy_commands = false, -- this will be removed in 4.0.0 + workspaces = { + { + name = "personal", + path = "~/vaults/personal", + }, + { + name = "work", + path = "~/vaults/work", + }, + }, + } + + vim.pack.add{ + { src = "https://github.com/yousefhadder/markdown-plus.nvim" }, + } + require("markdown-plus").setup({ + enabled = true, + + features = { + list_management = true, + text_formatting = true, + thematic_break = true, + links = true, + images = true, + headers_toc = true, + quotes = true, + callouts = true, + code_block = true, + html_block_awareness = true, + table = true, + footnotes = true, + }, + + keymaps = { + enabled = true, + }, + + filetypes = { "markdown" }, + + toc = { + initial_depth = 2, + }, + + thematic_break = { + style = "---", -- "---" | "***" | "___" + }, + + callouts = { + default_type = "NOTE", + custom_types = {}, + }, + + code_block = { + enabled = true, + fence_style = "backtick", -- "backtick" | "tilde" + languages = { "lua", "python", "bash", "json", "yaml", "markdown", "rust" }, + }, + + table = { + enabled = true, + auto_format = true, + default_alignment = "left", + confirm_destructive = true, + width_mode = "literal", -- "literal" | "segment" set "segment" so cells + -- containing
don't inflate column width + wrap_break = "
", -- token used by wrap/break commands and the + -- cell-editor popup join + max_column_width = nil, -- integer ≥ 1 or nil width used by wrap-cell + -- and auto-wrap; nil prompts each time + auto_wrap = false, -- when true (and max_column_width is set), the + -- formatter auto-wraps cells exceeding the cap. + -- Per-table opt-out: place + -- on the line + -- immediately above the table + cell_editor = { -- floating popup for te + enabled = true, + border = "rounded", -- nvim_open_win border style + width = 0.6, -- fraction of editor width, (0, 1] + height = 0.4, -- fraction of editor height, (0, 1] + }, + keymaps = { + enabled = true, + prefix = "t", + insert_mode_navigation = true, + }, + }, + + footnotes = { + section_header = "Footnotes", + confirm_delete = true, + }, + + list = { + smart_outdent = true, + whitespace = "single", -- "single" | "shiftwidth" + -- "single" (default): one space after the marker (standard Markdown) + -- "shiftwidth": pad so content aligns to a whitespace_width column block (relative to the item's indent) + -- Note: formatters like Prettier enforce single-space and will override this on save. + whitespace_width = 4, -- integer ≥ 1; block width used when whitespace = "shiftwidth" + checkbox_completion = { + enabled = false, + format = "emoji", -- "emoji" | "comment" | "dataview" | "parenthetical" + date_format = "%Y-%m-%d", + remove_on_uncheck = true, + update_existing = true, + }, + }, + + links = { + smart_paste = { + enabled = false, + timeout = 5, -- 1..30 + }, + }, + }) + vim.pack.add({ { src = "https://github.com/folke/lazydev.nvim" }, })