summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lsp/ts_ls.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lsp/ts_ls.lua')
-rw-r--r--.config/nvim/lsp/ts_ls.lua39
1 files changed, 39 insertions, 0 deletions
diff --git a/.config/nvim/lsp/ts_ls.lua b/.config/nvim/lsp/ts_ls.lua
new file mode 100644
index 0000000..860951b
--- /dev/null
+++ b/.config/nvim/lsp/ts_ls.lua
@@ -0,0 +1,39 @@
+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,
+ },
+ },
+ javascript = {
+ inlayHints = {
+ includeInlayParameterNameHints = "all",
+ includeInlayParameterNameHintsWhenArgumentMatchesName = false,
+ includeInlayFunctionParameterTypeHints = true,
+ includeInlayVariableTypeHints = true,
+ includeInlayVariableTypeHintsWhenTypeMatchesName = false,
+ includeInlayPropertyDeclarationTypeHints = true,
+ includeInlayFunctionLikeReturnTypeHints = true,
+ includeInlayEnumMemberValueHints = true,
+ },
+ },
+ }
+}