diff options
| author | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2023-03-19 16:23:44 +0100 |
|---|---|---|
| committer | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2023-03-19 16:23:44 +0100 |
| commit | 62a159413b68f6f121338ada0f38f23f96c77772 (patch) | |
| tree | fdfa3a99ca2d15fd2d545c0ffab770b5192e71bd /lua/alpha | |
| parent | 2102a092434c9c15f71416c889e4f7093796b664 (diff) | |
| download | nvim-conf-62a159413b68f6f121338ada0f38f23f96c77772.tar.gz nvim-conf-62a159413b68f6f121338ada0f38f23f96c77772.zip | |
feat(inlay-hints): install & config
Diffstat (limited to 'lua/alpha')
| -rw-r--r-- | lua/alpha/lsp/servers.lua | 46 |
1 files changed, 39 insertions, 7 deletions
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, } |