From 41ee40356defa00fe2248065ad43ed7d6d44ea36 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Wed, 18 Jun 2025 18:37:22 +0900 Subject: modified cheatsheet/grid.lua, modified utils/utils.lua --- ar/.config/TheSiahxyz/lua/thesiahxyz/utils/cheatsheet/grid.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ar/.config/TheSiahxyz/lua/thesiahxyz/utils/cheatsheet') diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/utils/cheatsheet/grid.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/utils/cheatsheet/grid.lua index 6616b1e..ced539b 100644 --- a/ar/.config/TheSiahxyz/lua/thesiahxyz/utils/cheatsheet/grid.lua +++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/utils/cheatsheet/grid.lua @@ -78,14 +78,14 @@ return function(buf, win, action) -- Highlight ASCII art and title for i = 1, #ascii_header do - api.nvim_buf_add_highlight(buf, ns, "ThesiahAsciiHeader", i - 1, 0, -1) + vim.hl.range(buf, ns, "ThesiahAsciiHeader", { i - 1, 0 }, { i - 1, -1 }, {}) end - api.nvim_buf_add_highlight(buf, ns, "Title", #ascii + 1, 0, -1) + vim.hl.range(buf, ns, "Title", { #ascii + 1, 0 }, { #ascii + 1, -1 }, {}) -- Highlight section headers local current_line = #ascii + 3 -- Adjust for blank lines and title for section_name, mappings in pairs(state.mappings_tb) do - api.nvim_buf_add_highlight(buf, ns, "ThesiahSection", current_line, 0, -1) + vim.hl.range(buf, ns, "TheSiahSection", { current_line, 0 }, { current_line, -1 }, {}) current_line = current_line + #mappings + 2 -- Count section header, mappings, and blank line end -- cgit v1.2.3