nvim: lsp: Enable inlay hints for TypeScript/JavaScript

This commit is contained in:
Sanchayan Maity 2021-11-15 13:25:06 +05:30
parent b9e6330245
commit cc75f12e3f

View file

@ -79,6 +79,9 @@ local ts_utils_setup = function(client, bufnr, opts)
filter_out_diagnostics_by_severity = {},
filter_out_diagnostics_by_code = {},
auto_inlay_hints = true,
inlay_hints_highlight = "Hint",
}
ts_utils.setup_client(client)
@ -244,7 +247,7 @@ local rust_tool_opts = {
},
}
local servers = { 'hls', 'pylsp', 'tsserver' }
local servers = { 'hls', 'pylsp' }
for _, lsp in ipairs(servers) do
nvim_lsp[lsp].setup {
on_attach = on_attach,
@ -296,3 +299,8 @@ nvim_lsp.sumneko_lua.setup {
},
},
}
nvim_lsp.tsserver.setup {
init_options = require("nvim-lsp-ts-utils").init_options,
on_attach = on_attach,
}