summaryrefslogtreecommitdiff
path: root/ar/.config/TheSiahxyz/lua/thesiahxyz/utils/cheatsheet/grid.lua
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-06-18 18:37:22 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-06-18 18:37:22 +0900
commit41ee40356defa00fe2248065ad43ed7d6d44ea36 (patch)
treebe466e195378051abd7b83f1acbf055bed583efa /ar/.config/TheSiahxyz/lua/thesiahxyz/utils/cheatsheet/grid.lua
parent9b7f06cece3baaeae361e49c567c85c0bdc80d91 (diff)
modified cheatsheet/grid.lua, modified utils/utils.lua
Diffstat (limited to 'ar/.config/TheSiahxyz/lua/thesiahxyz/utils/cheatsheet/grid.lua')
-rw-r--r--ar/.config/TheSiahxyz/lua/thesiahxyz/utils/cheatsheet/grid.lua6
1 files changed, 3 insertions, 3 deletions
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