Inlay hints for Deno LSP in nvim?

I am using LazyVim and i got used to inlay type hints in my code. I recently started to use Deno and my only problem is that in Deno language pack for lsp there are no Inlay Hints. Or am I missing something? Did anyone tried to configure it?
1 Reply
marcus_polonus
marcus_polonusOP5w ago
Ok I made it work. Added this from the inlay-hints repo:
require("lspconfig").denols.setup({
settings = {
deno = {
inlayHints = {
parameterNames = { enabled = "all", suppressWhenArgumentMatchesName = true },
parameterTypes = { enabled = true },
variableTypes = { enabled = true, suppressWhenTypeMatchesName = true },
propertyDeclarationTypes = { enabled = true },
functionLikeReturnTypes = { enable = true },
enumMemberValues = { enabled = true },
},
}
}
})
require("lspconfig").denols.setup({
settings = {
deno = {
inlayHints = {
parameterNames = { enabled = "all", suppressWhenArgumentMatchesName = true },
parameterTypes = { enabled = true },
variableTypes = { enabled = true, suppressWhenTypeMatchesName = true },
propertyDeclarationTypes = { enabled = true },
functionLikeReturnTypes = { enable = true },
enumMemberValues = { enabled = true },
},
}
}
})

Did you find this page helpful?