Skip to content

allworldg/doc-highlight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

doc-highlight.nvim

A neovim plugin for LSP Document Highlight. Automatically highlighting other references of the word under the cursor by LSP.

Demo

doc-highlight

Features

  • Automatically highlighting other references of the word under the cursor.
  • Reduce flicker and LSP requests when move the cursor in the references.

Installation

with vim.pack
vim.pack.add({ "https://github.com/allworldg/doc-highlight" }, { confirm = false })
with lazy.nvim
{"allworldg/doc-highlight"}
copy

This plugin code is very simple, and all the code is in the lua/doc-highlight.lua, so you can easily just copy code and put it in your config.

Remember to call require("doc-highlight").setup() to enable it.

Highlight Groups

DocHighlight

Highlight group used for references. vim.api.nvim_set_hl(0,'DocHighlight',{bg=xxx,fg=xxx})

Similar plugins

  • Builtin document highlight in Neovim, see :h vim.lsp.buf.document_highlight()
  • vim-illuminate

About

a nvim plugin for Lsp Document Highlight

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages