Add default language server settings to display inlay hints for Go and TypeScript (#7854)
Hints are still disabled by default in Zed, but when those get enabled, the language server settings allow to display those instantly without further server configuration, which might be not obvious. Also add the documentation enties for those settings and their defaults in Zed. Closes https://github.com/zed-industries/zed/issues/7821 Release Notes: - Added default settings for TypeScript and Go LSP servers to enable inlay hints when those are turned on in Zed ([7821](https://github.com/zed-industries/zed/issues/7821))
This commit is contained in:
parent
a41fb29e01
commit
bdc2558eac
4 changed files with 88 additions and 0 deletions
|
@ -174,6 +174,15 @@ impl super::LspAdapter for GoLspAdapter {
|
|||
fn initialization_options(&self) -> Option<serde_json::Value> {
|
||||
Some(json!({
|
||||
"usePlaceholders": true,
|
||||
"hints": {
|
||||
"assignVariableTypes": true,
|
||||
"compositeLiteralFields": true,
|
||||
"compositeLiteralTypes": true,
|
||||
"constantValues": true,
|
||||
"functionTypeParameters": true,
|
||||
"parameterNames": true,
|
||||
"rangeVariableTypes": true
|
||||
}
|
||||
}))
|
||||
}
|
||||
|
||||
|
|
|
@ -160,6 +160,16 @@ impl LspAdapter for TypeScriptLspAdapter {
|
|||
"tsserver": {
|
||||
"path": "node_modules/typescript/lib",
|
||||
},
|
||||
"preferences": {
|
||||
"includeInlayParameterNameHints": "all",
|
||||
"includeInlayParameterNameHintsWhenArgumentMatchesName": true,
|
||||
"includeInlayFunctionParameterTypeHints": true,
|
||||
"includeInlayVariableTypeHints": true,
|
||||
"includeInlayVariableTypeHintsWhenTypeMatchesName": true,
|
||||
"includeInlayPropertyDeclarationTypeHints": true,
|
||||
"includeInlayFunctionLikeReturnTypeHints": true,
|
||||
"includeInlayEnumMemberValueHints": true,
|
||||
}
|
||||
}))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue