This plugin shows type annotations as virtual text.
Most of the credit goes to jubnzv, who wrote the initial version of the plugin here.
- Neovim 0.8+
- nvim-lspconfig
- A LSP server that supports the textDocument/codeLens request
Using packer.nvim:
use("kylechui/virtual-types.nvim")
And add the following line in your LSP configuration:
require("lspconfig").ocamllsp.setup({
on_attach = function(client)
require("virtualtypes").on_attach(client)
end,
})