Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
close #29
  • Loading branch information
tzachar authored Feb 4, 2025
1 parent c8e5fa9 commit 8fa5286
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ Multiple plugins to highlight the word under the cursor exist. However, none of
1. Performance (especially on large files)
2. Highlight mechanics: by using extmarks, the current format of each highlighted word remains the same (e.g., italics, treesitter highlights)

# How the Plugin Works

`local-highlight` will attach to a buffer and register an autocommand for the
`CursorHold` event. Once the event fires, `local-highlight` will grab the word
under the cursor and will highlight all of the usages of the same word in the
visible lines of the buffer.

# Setup

You can setup local-highlight` as follows:`
Expand Down Expand Up @@ -142,12 +149,7 @@ Turn local highlighting on for the current buffer.
Echo timing information: total number of invocations and the average running
time in milliseconds.

# How the Plugin Works

`local-highlight` will attach to a buffer and register an autocommand for the
`CursorHold` event. Once the event fires, `local-highlight` will grab the word
under the cursor and will highlight all of the usages of the same word in the
visible lines of the buffer.

One implication of using `CursorHold` is that interactivity depends on
`updatetime`, which is 4000 by default. A good advice is to set it to something
Expand Down

0 comments on commit 8fa5286

Please sign in to comment.