but basically, I want to know how to make zls do the type infernce shown in the above picture. (The glowing green highlighted text after declaration of std and time) . The link to the origin of the screenshot is youtube. This is not a serious question I just want to know
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
map('<leader>th', function()
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf })
end, '[T]oggle Inlay [H]ints')
end
I find them bulky, but also useful, so I turn inlays on and off rather frequently. Goes in the LspAttach callback.