From 62a159413b68f6f121338ada0f38f23f96c77772 Mon Sep 17 00:00:00 2001 From: Ariel D'Alessandro Date: Sun, 19 Mar 2023 16:23:44 +0100 Subject: feat(inlay-hints): install & config --- lua/alpha/lsp/servers.lua | 46 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 39 insertions(+), 7 deletions(-) (limited to 'lua/alpha/lsp/servers.lua') diff --git a/lua/alpha/lsp/servers.lua b/lua/alpha/lsp/servers.lua index e4adacb..f09f523 100644 --- a/lua/alpha/lsp/servers.lua +++ b/lua/alpha/lsp/servers.lua @@ -5,11 +5,11 @@ local lsp_flags = { } local default = function() - return { - on_attach = lsp_attach, - flags = lsp_flags, - } - end + return { + on_attach = lsp_attach, + flags = lsp_flags, + } +end return { ["emmet_ls"] = function() @@ -49,6 +49,9 @@ return { telemetry = { enable = false, }, + hint = { + enable = true, + } }, }, } @@ -84,13 +87,42 @@ return { } end, ["svelte"] = default, - ["tailwindcss"] = function () + ["tailwindcss"] = function() return { on_attach = lsp_attach, flags = lsp_flags, filetypes = { "blade", "html", "svelte" }, } end, - ["tsserver"] = default, + ["tsserver"] = function() + return { + 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, + }, + }, + }, + } + end, ["volar"] = default, } -- cgit v1.2.3