From 611b21c84793659185687184e919c48864833672 Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Fri, 25 Jul 2025 15:59:35 +0545 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(lsp):=20add=20typescript-langu?= =?UTF-8?q?age-server=20setup=20with=20inlay=20hints=20configuration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lsp/ts_ls.lua | 28 ++++++++++++++++++++++++++++ lsp/typescript.lua | 8 -------- 2 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 lsp/ts_ls.lua delete mode 100644 lsp/typescript.lua diff --git a/lsp/ts_ls.lua b/lsp/ts_ls.lua new file mode 100644 index 0000000..e997cf8 --- /dev/null +++ b/lsp/ts_ls.lua @@ -0,0 +1,28 @@ +return { + settings = { + typescript = { + inlayHints = { + includeInlayParameterNameHints = 'all', + includeInlayParameterNameHintsWhenArgumentMatchesName = false, + includeInlayFunctionParameterTypeHints = true, + includeInlayVariableTypeHints = true, + includeInlayVariableTypeHintsWhenTypeMatchesName = false, + includeInlayPropertyDeclarationTypeHints = true, + includeInlayFunctionLikeReturnTypeHints = true, + includeInlayEnumMemberValueHints = true, + }, + }, + javascript = { + inlayHints = { + includeInlayParameterNameHints = 'all', + includeInlayParameterNameHintsWhenArgumentMatchesName = false, + includeInlayFunctionParameterTypeHints = true, + includeInlayVariableTypeHints = true, + includeInlayVariableTypeHintsWhenTypeMatchesName = false, + includeInlayPropertyDeclarationTypeHints = true, + includeInlayFunctionLikeReturnTypeHints = true, + includeInlayEnumMemberValueHints = true, + }, + }, + }, +} diff --git a/lsp/typescript.lua b/lsp/typescript.lua deleted file mode 100644 index be055f8..0000000 --- a/lsp/typescript.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - cmd = { 'typescript-language-server', '--stdio' }, - root_markers = { 'tsconfig.json', 'jsconfig.json', 'package.json', '.git' }, - filetypes = { 'javascript', 'javascriptreact', 'javascript.jsx', 'typescript', 'typescriptreact', 'typescript.tsx' }, - init_options = { - hostInfo = 'neovim', - }, -}