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.
This commit is contained in:
Radvil 2024-04-16 06:39:52 +08:00
parent 97480dc5d2
commit 0b7c3af81b

View file

@ -1,3 +1,15 @@
---@diagnostic disable: missing-fields
local inlay_hints_settings = {
includeInlayParameterNameHints = "all",
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
includeInlayFunctionParameterTypeHints = true,
includeInlayVariableTypeHints = true,
includeInlayVariableTypeHintsWhenTypeMatchesName = false,
includeInlayPropertyDeclarationTypeHints = true,
includeInlayFunctionLikeReturnTypeHints = true,
includeInlayEnumMemberValueHints = true,
}
return {
-- add typescript to treesitter
@ -46,8 +58,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,
},