noice + notify

This commit is contained in:
2026-06-17 19:38:58 +03:00
parent 85459a6fd6
commit 5ec108097b
16 changed files with 757 additions and 199 deletions

View File

@ -5,39 +5,39 @@ 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) -- Получаем имя файла
if buf_name:match("%.md$") and mutton == false and not buf_name:match("ui.md$") then -- Проверяем, заканчивается ли имя на ".md"
mutton = true
vim.cmd("MuttonToggle")
vim.opt.number = false
vim.opt.relativenumber = false
elseif mutton == true and buf_name:match("ui.md$") then
mutton = false
vim.cmd("wincmd l | q")
vim.cmd("wincmd h | q")
vim.cmd("MuttonToggle")
elseif buf_name:match("NvimTree_1$") then
elseif buf_name:match("%[%[Mutton%]%]$") then
elseif buf_name:match("/usr/bin/sh$") then
elseif mutton == true and not buf_name:match("%.md$") then
mutton = false
vim.cmd("MuttonToggle")
end
end, 100)
end
vim.api.nvim_create_autocmd("BufEnter", { callback = on_buf_read })
-- Для автовключения
-- local mutton = false
-- local function on_buf_read()
-- vim.defer_fn(function()
-- local buf_name = vim.api.nvim_buf_get_name(0) -- Получаем имя файла
--
--
-- if buf_name:match("%.md$") and mutton == false and not buf_name:match("ui.md$") then -- Проверяем, заканчивается ли имя на ".md"
-- mutton = true
-- vim.cmd("MuttonToggle")
--
-- vim.opt.number = false
-- vim.opt.relativenumber = false
-- elseif mutton == true and buf_name:match("ui.md$") then
-- mutton = false
-- vim.cmd("wincmd l | q")
-- vim.cmd("wincmd h | q")
-- vim.cmd("MuttonToggle")
--
-- elseif buf_name:match("NvimTree_1$") then
--
-- elseif buf_name:match("%[%[Mutton%]%]$") then
--
-- elseif buf_name:match("/usr/bin/sh$") then
--
-- elseif mutton == true and not buf_name:match("%.md$") then
-- mutton = false
-- vim.cmd("MuttonToggle")
-- end
-- end, 100)
-- end
--
-- vim.api.nvim_create_autocmd("BufEnter", { callback = on_buf_read })