PHPantom version
Main
Installation method
Built from source
Operating system
macOS aarch64 (Apple Silicon)
Editor
VS Code
Bug description
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
PHPantom version
Main
Installation method
Built from source
Operating system
macOS aarch64 (Apple Silicon)
Editor
VS Code
Bug description
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) === trueLooking at
phpantom_lsp/src/code_lens.rs
Line 312 in 5d921e8
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