Skip to content

Commit eaec2b8

Browse files
committed
updates to md files handling
Added more comprehensive markdown files handling. Next will add support for spellchecking
1 parent 42eb72e commit eaec2b8

1 file changed

Lines changed: 125 additions & 1 deletion

File tree

init.lua

Lines changed: 125 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ do
100100

101101
-- Set to true if you have a Nerd Font installed and selected in the terminal
102102
vim.g.have_nerd_font = true
103-
103+
vim.g.python3_host_prog = vim.fn.exepath("python")
104104
-- [[ Setting options ]]
105105
-- See `:help vim.o`
106106
-- NOTE: You can change these options as you wish!
@@ -279,6 +279,130 @@ do
279279
-- In this section we set up some autocommands to run build
280280
-- steps for certain plugins after they are installed or updated.
281281

282+
vim.pack.add{
283+
{
284+
src = "https://github.com/obsidian-nvim/obsidian.nvim",
285+
version = vim.version.range "*", -- use latest release, remove to use latest commit
286+
},
287+
}
288+
require("obsidian").setup {
289+
legacy_commands = false, -- this will be removed in 4.0.0
290+
workspaces = {
291+
{
292+
name = "personal",
293+
path = "~/vaults/personal",
294+
},
295+
{
296+
name = "work",
297+
path = "~/vaults/work",
298+
},
299+
},
300+
}
301+
302+
vim.pack.add{
303+
{ src = "https://github.com/yousefhadder/markdown-plus.nvim" },
304+
}
305+
require("markdown-plus").setup({
306+
enabled = true,
307+
308+
features = {
309+
list_management = true,
310+
text_formatting = true,
311+
thematic_break = true,
312+
links = true,
313+
images = true,
314+
headers_toc = true,
315+
quotes = true,
316+
callouts = true,
317+
code_block = true,
318+
html_block_awareness = true,
319+
table = true,
320+
footnotes = true,
321+
},
322+
323+
keymaps = {
324+
enabled = true,
325+
},
326+
327+
filetypes = { "markdown" },
328+
329+
toc = {
330+
initial_depth = 2,
331+
},
332+
333+
thematic_break = {
334+
style = "---", -- "---" | "***" | "___"
335+
},
336+
337+
callouts = {
338+
default_type = "NOTE",
339+
custom_types = {},
340+
},
341+
342+
code_block = {
343+
enabled = true,
344+
fence_style = "backtick", -- "backtick" | "tilde"
345+
languages = { "lua", "python", "bash", "json", "yaml", "markdown", "rust" },
346+
},
347+
348+
table = {
349+
enabled = true,
350+
auto_format = true,
351+
default_alignment = "left",
352+
confirm_destructive = true,
353+
width_mode = "literal", -- "literal" | "segment" set "segment" so cells
354+
-- containing <br> don't inflate column width
355+
wrap_break = "<br>", -- token used by wrap/break commands and the
356+
-- cell-editor popup join
357+
max_column_width = nil, -- integer ≥ 1 or nil width used by wrap-cell
358+
-- and auto-wrap; nil prompts each time
359+
auto_wrap = false, -- when true (and max_column_width is set), the
360+
-- formatter auto-wraps cells exceeding the cap.
361+
-- Per-table opt-out: place
362+
-- <!-- markdown-plus: no-wrap --> on the line
363+
-- immediately above the table
364+
cell_editor = { -- floating popup for <localleader>te
365+
enabled = true,
366+
border = "rounded", -- nvim_open_win border style
367+
width = 0.6, -- fraction of editor width, (0, 1]
368+
height = 0.4, -- fraction of editor height, (0, 1]
369+
},
370+
keymaps = {
371+
enabled = true,
372+
prefix = "<localleader>t",
373+
insert_mode_navigation = true,
374+
},
375+
},
376+
377+
footnotes = {
378+
section_header = "Footnotes",
379+
confirm_delete = true,
380+
},
381+
382+
list = {
383+
smart_outdent = true,
384+
whitespace = "single", -- "single" | "shiftwidth"
385+
-- "single" (default): one space after the marker (standard Markdown)
386+
-- "shiftwidth": pad so content aligns to a whitespace_width column block (relative to the item's indent)
387+
-- Note: formatters like Prettier enforce single-space and will override this on save.
388+
whitespace_width = 4, -- integer ≥ 1; block width used when whitespace = "shiftwidth"
389+
checkbox_completion = {
390+
enabled = false,
391+
format = "emoji", -- "emoji" | "comment" | "dataview" | "parenthetical"
392+
date_format = "%Y-%m-%d",
393+
remove_on_uncheck = true,
394+
update_existing = true,
395+
},
396+
},
397+
398+
links = {
399+
smart_paste = {
400+
enabled = false,
401+
timeout = 5, -- 1..30
402+
},
403+
},
404+
})
405+
282406
vim.pack.add({
283407
{ src = "https://github.com/folke/lazydev.nvim" },
284408
})

0 commit comments

Comments
 (0)