aboutsummaryrefslogtreecommitdiffstats
path: root/lua/alpha/lsp/servers/tsserver.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/alpha/lsp/servers/tsserver.lua')
-rw-r--r--lua/alpha/lsp/servers/tsserver.lua33
1 files changed, 33 insertions, 0 deletions
diff --git a/lua/alpha/lsp/servers/tsserver.lua b/lua/alpha/lsp/servers/tsserver.lua
new file mode 100644
index 0000000..e27d94a
--- /dev/null
+++ b/lua/alpha/lsp/servers/tsserver.lua
@@ -0,0 +1,33 @@
+local lsp_attach = require "alpha.lsp.attach"
+local lsp_flags = require "alpha.lsp.flags"
+
+return function(ops)
+ return vim.tbl_extend("force", {
+ on_attach = lsp_attach,
+ flags = lsp_flags,
+ settings = {
+ typescript = {
+ inlayHints = {
+ includeInlayParameterNameHints = "all",
+ includeInlayParameterNameHintsWhenArgumentMatchesName = false,
+ includeInlayFunctionParameterTypeHints = true,
+ includeInlayVariableTypeHints = true,
+ includeInlayPropertyDeclarationTypeHints = true,
+ includeInlayFunctionLikeReturnTypeHints = true,
+ includeInlayEnumMemberValueHints = true,
+ },
+ },
+ javascript = {
+ inlayHints = {
+ includeInlayParameterNameHints = "all",
+ includeInlayParameterNameHintsWhenArgumentMatchesName = false,
+ includeInlayFunctionParameterTypeHints = true,
+ includeInlayVariableTypeHints = true,
+ includeInlayPropertyDeclarationTypeHints = true,
+ includeInlayFunctionLikeReturnTypeHints = true,
+ includeInlayEnumMemberValueHints = true,
+ },
+ },
+ },
+ }, ops)
+end