There's no way to actually use the default value of `InitializationOptions` (inferred from the config file) since the zero value is false (that is, you must manually specify all the specs of the `InitializeOptions` in the lsp client) #250
will always set the hasCompletionCommand, hasHoverCommand, etc. to false unless the user manually specify all the fields of InitializeOptions to true in the LSP client settings, which also means the code to infer the default value of those options will never be active since they will become false once params.InitializeOptions is read:
// These lines will never be effective
for _, config := range h.configs {
for _, v := range config {
if v.CompletionCommand != "" {
hasCompletionCommand = true
}
if v.HoverCommand != "" {
hasHoverCommand = true
}
if v.SymbolCommand != "" {
hasSymbolCommand = true
}
if v.FormatCommand != "" {
hasFormatCommand = true
if v.FormatCanRange {
hasRangeFormatCommand = true
}
}
}
}
This is a regression and also a breaking change since most user used v0.44. At that time the InitializeOptions was firstly read and then changed based on the config file. With the release of v0.46, the user must specify all the InitializeOptions in the LSP client settings.
The zero value of a bool is false in go, which means the following lines:
will always set the
hasCompletionCommand
,hasHoverCommand
, etc. to false unless the user manually specify all the fields ofInitializeOptions
to true in the LSP client settings, which also means the code to infer the default value of those options will never be active since they will become false onceparams.InitializeOptions
is read:This is a regression and also a breaking change since most user used v0.44. At that time the
InitializeOptions
was firstly read and then changed based on the config file. With the release of v0.46, the user must specify all the InitializeOptions in the LSP client settings.