summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcelo <setanta@gmail.com>2025-04-03 17:24:37 -0300
committerMarcelo <setanta@gmail.com>2025-04-04 00:10:31 -0300
commit33955726e11186851c8a9ddde2b5119ad58af6ce (patch)
tree475aa00ce33b41522fd34076e77af331ed2d42b7
parent3feb93a4e0df380505e23024fe03de1f7046a764 (diff)
Add a markdown renderer plugin.
-rw-r--r--lua/config/plugins/notes.lua33
-rw-r--r--lua/config/plugins/treesitter.lua1
2 files changed, 32 insertions, 2 deletions
diff --git a/lua/config/plugins/notes.lua b/lua/config/plugins/notes.lua
index c374e94..57d5d24 100644
--- a/lua/config/plugins/notes.lua
+++ b/lua/config/plugins/notes.lua
@@ -27,9 +27,38 @@ return {
vim.api.nvim_set_keymap("n", "<leader>zt", "<Cmd>ZkTags<CR>", opts)
-- Search for the notes matching a given query.
- vim.api.nvim_set_keymap("n", "<leader>zf", "<Cmd>ZkNotes { sort = { 'modified' }, match = { vim.fn.input('Search: ') } }<CR>", opts)
+ vim.api.nvim_set_keymap("n", "<leader>zf",
+ "<Cmd>ZkNotes { sort = { 'modified' }, match = { vim.fn.input('Search: ') } }<CR>", opts)
-- Search for the notes matching the current visual selection.
vim.api.nvim_set_keymap("v", "<leader>zf", ":'<,'>ZkMatch<CR>", opts)
end
- }
+ },
+
+ -- Plugin to improve viewing Markdown files in Neovim
+ {
+ "MeanderingProgrammer/render-markdown.nvim",
+ dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-tree/nvim-web-devicons" },
+ opts = {},
+ config = function()
+ local min_width = 80
+ require("render-markdown").setup({
+ code = {
+ position = "right",
+ width = "block",
+ border = "thick",
+ min_width = min_width,
+ left_pad = 1,
+ right_pad = 1,
+ },
+ completions = { lsp = { enabled = true } },
+ dash = {
+ width = min_width,
+ },
+ heading = {
+ width = "block",
+ min_width = min_width,
+ },
+ })
+ end,
+ },
}
diff --git a/lua/config/plugins/treesitter.lua b/lua/config/plugins/treesitter.lua
index 12306d7..5312e07 100644
--- a/lua/config/plugins/treesitter.lua
+++ b/lua/config/plugins/treesitter.lua
@@ -31,6 +31,7 @@ return {
"http",
"javascript",
"json",
+ "latex",
"lua",
"make",
"markdown",