Skip to content

A Neovim plugin to highlight the current identifier under the cursor.

License

Notifications You must be signed in to change notification settings

David-Kunz/spotlight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Spotlight

A Neovim plugin to highlight the current identifier under the cursor.

Installation

Packer:

use 'David-Kunz/spotlight'

Usage

require('spotlight').run()

Options

require('spotlight').setup(options)

with the following options (with defaults):

options = {
  hl_group = 'LspReferenceText', -- highlight group
  highlight_at_cursor = true -- also highlight the word under the cursor
}

Tip

To automatically run it after the cursor was moved:

  • instantaneously:
vim.api.nvim_create_autocmd("CursorMoved", {callback = require('spotlight').run})
  • with a small delay:
vim.api.nvim_create_autocmd("CursorHold", {callback = require('spotlight').run})

About

A Neovim plugin to highlight the current identifier under the cursor.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages