Skip to content

Commit 517df88

Browse files
authored
docs: updates readme with correct hooks information (#148)
1 parent 943be69 commit 517df88

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

README.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,9 @@ library to do custom highlighting themselves.
168168
always_update = false,
169169
-- hooks to invert control of colorizer
170170
hooks = {
171-
-- called before line parsing. Set to function that returns a boolean and accepts the following parameters. See hooks section.
172-
do_lines_parse = false,
171+
-- called before line parsing. Accepts boolean or function that returns boolean
172+
-- see hooks section below
173+
disable_line_highlight = false,
173174
},
174175
},
175176
})
@@ -179,12 +180,12 @@ library to do custom highlighting themselves.
179180

180181
Hooks into colorizer can be defined to customize colorization behavior.
181182

182-
`do_lines_parse`: Expects a function that returns a boolean. The function is called before line parsing with the following function signature:
183+
`disable_line_highlight`: Expects a function that returns a boolean. The function is called before line parsing with the following function signature:
183184

184185
```lua
185186
---@param line string: Line's contents
186187
---@param bufnr number: Buffer number
187-
---@line_num number: Line number (0-indexed). Ad 1 to get the line number in buffer
188+
---@line_num number: Line number (0-indexed). Add 1 to get the line number in buffer
188189
---@return boolean: Return true if current line should be parsed for highlighting.
189190
function(line, bufnr, line_num)
190191
-- Treesitter could also be used, but be warned it will be quite laggy unless you are caching results somehow

0 commit comments

Comments
 (0)