From 7b9abab298e0624b615d5c9b3879d7c3fca76242 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 29 Jul 2024 23:03:02 +0200 Subject: [PATCH] nvim: Improve quarto syntax rendering Removed the standalone vim-pandoc-syntax plugin since I have not really been using its functionality for a long time. Additionally, set reduce conceallevel in markdown and quarto files to 2 for the time being to prevent some rendering errors (especially on headlines) when interacting with the markdown.nvim (render-markdown) plugin. --- nvim/.config/nvim/lua/plugins/data_analysis.lua | 1 - nvim/.config/nvim/lua/plugins/prose.lua | 14 ++++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/nvim/.config/nvim/lua/plugins/data_analysis.lua b/nvim/.config/nvim/lua/plugins/data_analysis.lua index 5088b87..c922aaa 100644 --- a/nvim/.config/nvim/lua/plugins/data_analysis.lua +++ b/nvim/.config/nvim/lua/plugins/data_analysis.lua @@ -15,7 +15,6 @@ return { dependencies = { "jmbuhr/otter.nvim", "neovim/nvim-lspconfig", - "vim-pandoc/vim-pandoc-syntax", "hrsh7th/nvim-cmp", "nvim-treesitter/nvim-treesitter", { "benlubas/molten-nvim", optional = true }, diff --git a/nvim/.config/nvim/lua/plugins/prose.lua b/nvim/.config/nvim/lua/plugins/prose.lua index 6b3d398..997a651 100644 --- a/nvim/.config/nvim/lua/plugins/prose.lua +++ b/nvim/.config/nvim/lua/plugins/prose.lua @@ -1,4 +1,4 @@ -local writing_ft = { "quarto", "pandoc", "markdown", "text", "tex", "typst", "bib", "context", "rst" } +local writing_ft = { "quarto", "pandoc", "markdown", "text", "tex", "typst", "bib", "context", "rst", "vimwiki" } local prose_plugs = { -- UI improvements @@ -44,7 +44,17 @@ local prose_plugs = { { "MeanderingProgrammer/markdown.nvim", main = "render-markdown", - opts = {}, + opts = { + file_types = { "markdown", "quarto", "pandoc", "vimwiki" }, + win_options = { + conceallevel = { + rendered = 2, + }, + }, + heading = { + width = "block", + }, + }, name = "render-markdown", -- Only needed if you have another plugin named markdown.nvim dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-tree/nvim-web-devicons" }, -- if you prefer nvim-web-devicons ft = writing_ft,