Help us shape the future of Go! Take the 2026 Go Developer Survey

phpantom

package
v1.38.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package phpantom manages the phpantom_lsp language server behind tinker's autocomplete, diagnostics and hover. It is a self-contained Rust binary that needs no PHP, so it runs on the host from BinDir instead of in the PHP images.

Index

Constants

View Source
const Version = "0.11.1"

Version pins the phpantom_lsp release lerd installs. Bump alongside a tested upgrade; the binary is re-fetched when the on-disk copy is missing.

Variables

This section is empty.

Functions

func BinPath

func BinPath() string

BinPath is the managed location of the phpantom_lsp executable.

func Command added in v1.37.0

func Command(ctx context.Context, dir string) (*exec.Cmd, error)

Command returns a phpantom_lsp process rooted at dir. XDG_CONFIG_HOME points at a lerd-owned folder because a .phpantom.toml is the only way to pick the token mode; a project's own .phpantom.toml still overrides it.

func EnsureBinary

func EnsureBinary(ctx context.Context, w io.Writer) error

EnsureBinary downloads and extracts phpantom_lsp into BinDir when it is not already present. It is safe to call on every connection: once installed it returns immediately. The download honours ctx, so a caller whose request is cancelled (e.g. the browser tab closing mid-download) aborts the fetch.

func Installed

func Installed() bool

Installed reports whether the managed binary is present and matches the pinned Version. A bare binary with no (or a mismatched) stamp counts as not installed so EnsureBinary upgrades it.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL