Skip to content

Latest commit

 

History

History
53 lines (35 loc) · 1.48 KB

README.md

File metadata and controls

53 lines (35 loc) · 1.48 KB

Virtuality.nvim

A Lua plugin facilitating the LSP textDocument/inlayHint command to provide virtual text type annotations.

Example

Demo image

Supported LSPs

Installation

Using packer.nvim

use { "27justin/virtuality.nvim" }

After installation, every buffer that supports the feature should display type annotations. No need to setup() anything.

Colors

The type annotations are highlighted using VirtualityInlayHint, which in itself is linked to Comment by default.

Debugging

Virtuality exports two functions.

  • update(bufnr: integer|nil) -> updates the annotations for either buffer bufnr or the current buffer if nil.
  • check() -> checks whether any of the LSPs connected to the current buffer support textDocument/inlayHint. This function is asynchronous, the results are sent using vim.notify.
require"virtuality".update()
require"virtuality".check()

Plugin structure

.
├── lua
│   ├── virtuality
│   │   └── module.lua
│   └── virtuality.lua
├── plugin
│   └── virtuality.lua
└── README.md