summaryrefslogtreecommitdiff
path: root/ar/.config/TheSiahxyz/lua/thesiahxyz/utils/cheatsheet/grid.lua
diff options
context:
space:
mode:
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