render markdown only line render

This commit is contained in:
2025-04-03 15:18:04 +03:00
parent 340430a5cd
commit dde7d87052
5 changed files with 82 additions and 7 deletions

View File

@ -5,11 +5,11 @@ vim.api.nvim_set_hl(0, "EndOfBuffer", { fg = normal_bg} ) -- overrides `~` chara
vim.api.nvim_set_hl(0, "VertSplit", { fg = normal_bg} ) -- overrides `~` character at the end of buffer
vim.api.nvim_set_hl(0, "WinSeparator", { fg = normal_bg })
local mutton = false
local function on_buf_read()
vim.defer_fn(function()
local buf_name = vim.api.nvim_buf_get_name(0) -- Получаем имя файла
print (buf_name)
if buf_name:match("%.md$") and mutton == false then -- Проверяем, заканчивается ли имя на ".md"
mutton = true
vim.cmd("MuttonToggle")
@ -28,6 +28,25 @@ end
vim.api.nvim_create_autocmd("BufEnter", { callback = on_buf_read })
-- ~/.config/nvim/init.lua
-- Создаем автокоманду для события QuitPre
vim.api.nvim_create_autocmd("QuitPre", {
callback = function()