Skip to content

Unexpected return values for Expert.Configuration.client_supports?/1 #113

@janpieper

Description

@janpieper

While debugging something I stumbled upon this:

iex> Expert.Configuration.client_supports?(:tags)
%{value_set: [1]}

iex> Expert.Configuration.client_supports?(:signature_help)
%GenLSP.Structures.SignatureHelpClientCapabilities{
  context_support: nil,
  signature_information: %{
    documentation_format: ["markdown", "plaintext"],
    parameter_information: %{label_offset_support: true},
    active_parameter_support: true
  },
  dynamic_registration: false
}

The function spec claims the function only returns a boolean:

@spec client_supports?(atom()) :: boolean()
def client_supports?(key) when is_atom(key) do

I wanted to prepare a PR, but then I was wondering whether we should simply check for value !== false to see if that feature is supported or if there is more logic needed to figure out whether those features are supported or not 🤷

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions