feat(typescript): configure inlayHint (#2995)

* feat(typescript): configure inlayHint
since LazyVim have toggle inlayhint keymap, it make sense to configure
them for each extra languages provided. In this commit I just add the
configuration for typescript, since IDK how to configure the rest of
lang extras that was provided.

* fix: changed defaults

---------

Co-authored-by: Radvil <radvil.linux@gmail.com>
Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
This commit is contained in:
Radvil 2024-05-15 21:45:13 +08:00 committed by GitHub
parent 543dead590
commit 2c86da7c2d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,3 +1,14 @@
local inlay_hints_settings = {
includeInlayEnumMemberValueHints = true,
includeInlayFunctionLikeReturnTypeHints = true,
includeInlayFunctionParameterTypeHints = true,
includeInlayParameterNameHints = "literal",
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
includeInlayPropertyDeclarationTypeHints = true,
includeInlayVariableTypeHints = false,
includeInlayVariableTypeHintsWhenTypeMatchesName = false,
}
return {
-- add typescript to treesitter
@ -46,8 +57,13 @@ return {
desc = "Remove Unused Imports",
},
},
---@diagnostic disable-next-line: missing-fields
settings = {
typescript = {
inlayHints = inlay_hints_settings,
},
javascript = {
inlayHints = inlay_hints_settings,
},
completions = {
completeFunctionCalls = true,
},