Skip to content

Error when clicking CodeLens in Cursor #236

Description

@CicerBro

PHPantom version

Main

Installation method

Built from source

Operating system

macOS aarch64 (Apple Silicon)

Editor

VS Code

Bug description

Image

Clicking the Code Lens above the method results in error:
argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true

Looking at

fn build_code_lens_command(&self, title: String, uri: Url, position: Position) -> Command {
it has a check for if client.contains("Visual Studio Code") but that won't work with VSCode forks like Cursor, VSCodium and others. I added Cursor and VSCodium there, rebuilt PHPantom and that works.

But it feels brittle, not sure how to fix that properly though. This perhaps? https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#window_showDocument

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions