Rob Wilson 24fdc0a15c Update docs
2023-08-12 01:34:05 +01:00
2023-08-12 01:34:05 +01:00

Statusline Action Hints

statusline-action-hints screenshot

A Neovim plugin to show statusline information about the word under the cursor.

Available statusline hints:

  • go-to-definition (gd) is available
  • reference list (gr) available / number of references

Installation

Lazy

{
  "roobert/statusline-action-hints.nvim",
  config = function()
    require("statusline-action-hints").setup()
  end,
},

Packer

use({
  "roobert/statusline-action-hints.nvim",
  config = function()
    require("statusline-action-hints").setup()
  end,
})

Configuration

{
  "roobert/statusline-action-hints.nvim",
  config = function()
    require("statusline-action-hints").setup({
      template = {
        { " ⊛", "StatuslineActionHintsDefinition" },
        { " ↱%s", "StatuslineActionHintsReferences" },
      },
      use_virtual_text = true,
    })
  end,
},

Adjust highlight colours for virtual text:

highlight StatuslineActionHintsDefinition guifg=#add8e6
highlight StatuslineActionHintsReferences guifg=#ff6666

Usage

Note that for now the component must be included in the lualine for the virtual text to be updated.

As a lualine statusline component:

require('lualine').setup {
  sections = {
    lualine_x = { require("statusline-action-hints").statusline },
  }
}
Description
A Neovim plugin that displays available actions like 'Go to Definition' and 'Go to Reference(s)' for the highlighted word, presented in the statusline or inline as virtual text.
Readme 59 KiB
Languages
Lua 100%