Skip to content

Commit

Permalink
feat(typescript): configure inlayHint (#2995)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
3 people committed May 15, 2024
1 parent 543dead commit 2c86da7
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion lua/lazyvim/plugins/extras/lang/typescript.lua
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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,
},
Expand Down

0 comments on commit 2c86da7

Please sign in to comment.