You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Closed
milanglacier opened this issue
Jul 29, 2023
· 1 comment
· Fixed by #256
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 effectivefor_, config:=rangeh.configs {
for_, v:=rangeconfig {
ifv.CompletionCommand!="" {
hasCompletionCommand=true
}
ifv.HoverCommand!="" {
hasHoverCommand=true
}
ifv.SymbolCommand!="" {
hasSymbolCommand=true
}
ifv.FormatCommand!="" {
hasFormatCommand=trueifv.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 text was updated successfully, but these errors were encountered:
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.The text was updated successfully, but these errors were encountered: