aboutsummaryrefslogtreecommitdiffstats
path: root/lua/pi/lsp/servers/ts_ls.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/pi/lsp/servers/ts_ls.lua')
-rw-r--r--lua/pi/lsp/servers/ts_ls.lua51
1 files changed, 27 insertions, 24 deletions
diff --git a/lua/pi/lsp/servers/ts_ls.lua b/lua/pi/lsp/servers/ts_ls.lua
index c68c894..ad4953b 100644
--- a/lua/pi/lsp/servers/ts_ls.lua
+++ b/lua/pi/lsp/servers/ts_ls.lua
@@ -2,32 +2,35 @@ local lsp_attach = require "pi.lsp.attach"
local lsp_flags = require "pi.lsp.flags"
return function(ops)
+ local capabilities = require("blink.cmp").get_lsp_capabilities(vim.lsp.protocol.make_client_capabilities())
return vim.tbl_extend("force", {
- on_attach = lsp_attach,
- flags = lsp_flags,
- settings = {
- typescript = {
- inlayHints = {
- includeInlayParameterNameHints = "all",
- includeInlayParameterNameHintsWhenArgumentMatchesName = false,
- includeInlayFunctionParameterTypeHints = true,
- includeInlayVariableTypeHints = true,
- includeInlayPropertyDeclarationTypeHints = true,
- includeInlayFunctionLikeReturnTypeHints = true,
- includeInlayEnumMemberValueHints = true,
- },
+ on_attach = lsp_attach,
+ capabilities = capabilities,
+ flags = lsp_flags,
+ filetypes = { "typescriptreact", "javascriptreact", "blade", "vue" },
+ 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,
- },
+ },
+ javascript = {
+ inlayHints = {
+ includeInlayParameterNameHints = "all",
+ includeInlayParameterNameHintsWhenArgumentMatchesName = false,
+ includeInlayFunctionParameterTypeHints = true,
+ includeInlayVariableTypeHints = true,
+ includeInlayPropertyDeclarationTypeHints = true,
+ includeInlayFunctionLikeReturnTypeHints = true,
+ includeInlayEnumMemberValueHints = true,
},
},
- }, ops)
+ },
+ }, ops)
end