diff options
Diffstat (limited to 'lsp/typescript-language-server.lua')
-rw-r--r-- | lsp/typescript-language-server.lua | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/lsp/typescript-language-server.lua b/lsp/typescript-language-server.lua new file mode 100644 index 0000000..41a3110 --- /dev/null +++ b/lsp/typescript-language-server.lua @@ -0,0 +1,39 @@ +return { + cmd = { "typescript-language-server", "--stdio" }, + root_markers = { "package.json", "jsconfig.json", "tsconfig.json" }, + filetypes = { + "javascript", + "javascriptreact", + "javascript.jsx", + "typescript", + "typescriptreact", + "typescript.tsx", + }, + settings = { + typescript = { + inlayHints = { + includeInlayParameterNameHints = "all", + includeInlayParameterNameHintsWhenArgumentMatchesName = true, + includeInlayVariableTypeHints = true, + includeInlayFunctionParameterTypeHints = true, + includeInlayVariableTypeHintsWhenTypeMatchesName = true, + includeInlayPropertyDeclarationTypeHints = true, + includeInlayFunctionLikeReturnTypeHints = true, + includeInlayEnumMemberValueHints = true, + }, + }, + javascript = { + inlayHints = { + includeInlayParameterNameHints = "all", + includeInlayParameterNameHintsWhenArgumentMatchesName = true, + includeInlayVariableTypeHints = true, + + includeInlayFunctionParameterTypeHints = true, + includeInlayVariableTypeHintsWhenTypeMatchesName = true, + includeInlayPropertyDeclarationTypeHints = true, + includeInlayFunctionLikeReturnTypeHints = true, + includeInlayEnumMemberValueHints = true, + }, + }, + }, +} |