Skip to content

27justin/virtuality.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Virtual type annotation in neovim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages