Skip to content

[lsp] Hover verbosity fails after increasing verbosity #4010

@rchl

Description

@rchl

I don't know how to test this in vscode but I've implemented support for hover verbosity levels in sublimelsp/LSP-tsgo#2 and it has a bug with the following code.

It triggers after increasing and reducing verbosity on JobsStateToColor. After that the server doesn't provide canIncreaseVerbosity property on hover response anymore

This works correctly with tsserver implementation (in vscode or other editors).

export const JOB_STATES = ["created", "active", "completed", "failed", "retry", "cancelled", "archive"] as const
export type JobState = (typeof JOB_STATES)[number]
type Color = "default" | "primary" | "secondary" | "success" | "warning" | "danger"
const JobsStateToColor: Record<
  JobState,
  {
    color: Color
    label: string
    labelPlural: string
  }
> = {
  created: {
    color: "success",
    label: "Направљен",
    labelPlural: "Направљени",
  },
  active: {
    color: "success",
    label: "Активан",
    labelPlural: "Активни",
  },
  completed: {
    color: "success",
    label: "Успешан",
    labelPlural: "Успешни",
  },
  cancelled: {
    color: "default",
    label: "Отаказан",
    labelPlural: "Отаказни",
  },
  failed: {
    color: "danger",
    label: "Пао",
    labelPlural: "Пали",
  },
  archive: {
    color: "default",
    label: "Архивиран",
    labelPlural: "Архивирани",
  },
  retry: {
    color: "warning",
    label: "Понавља се",
    labelPlural: "Понављају се",
  },
}

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions