summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lsp/ts_ls.lua
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.config/nvim/lsp/ts_ls.lua44
1 files changed, 13 insertions, 31 deletions
diff --git a/.config/nvim/lsp/ts_ls.lua b/.config/nvim/lsp/ts_ls.lua
index 860951b..95a179d 100644
--- a/.config/nvim/lsp/ts_ls.lua
+++ b/.config/nvim/lsp/ts_ls.lua
@@ -1,39 +1,21 @@
+local inlayHints = {
+ includeInlayParameterNameHints = "all",
+ includeInlayParameterNameHintsWhenArgumentMatchesName = false,
+ includeInlayFunctionParameterTypeHints = true,
+ includeInlayVariableTypeHints = true,
+ includeInlayVariableTypeHintsWhenTypeMatchesName = false,
+ includeInlayPropertyDeclarationTypeHints = true,
+ includeInlayFunctionLikeReturnTypeHints = true,
+ includeInlayEnumMemberValueHints = true,
+}
+
return {
- init_options = { hostInfo = 'neovim' },
- cmd = { 'typescript-language-server', '--stdio' },
- filetypes = {
- 'javascript',
- 'javascriptreact',
- 'javascript.jsx',
- 'typescript',
- 'typescriptreact',
- 'typescript.tsx',
- },
- root_markers = { 'tsconfig.json', 'jsconfig.json', 'package.json'},
settings = {
typescript = {
- inlayHints = {
- includeInlayParameterNameHints = "all",
- includeInlayParameterNameHintsWhenArgumentMatchesName = false,
- includeInlayFunctionParameterTypeHints = true,
- includeInlayVariableTypeHints = true,
- includeInlayVariableTypeHintsWhenTypeMatchesName = false,
- includeInlayPropertyDeclarationTypeHints = true,
- includeInlayFunctionLikeReturnTypeHints = true,
- includeInlayEnumMemberValueHints = true,
- },
+ inlayHints = inlayHints,
},
javascript = {
- inlayHints = {
- includeInlayParameterNameHints = "all",
- includeInlayParameterNameHintsWhenArgumentMatchesName = false,
- includeInlayFunctionParameterTypeHints = true,
- includeInlayVariableTypeHints = true,
- includeInlayVariableTypeHintsWhenTypeMatchesName = false,
- includeInlayPropertyDeclarationTypeHints = true,
- includeInlayFunctionLikeReturnTypeHints = true,
- includeInlayEnumMemberValueHints = true,
- },
+ inlayHints = inlayHints,
},
}
}