Pike LSP - Language Server for Pike
A comprehensive Language Server Protocol (LSP) implementation for the Pike programming language, providing modern IDE features for VS Code and other LSP-capable editors.
Current Status
Project Status
Alpha - The project is actively developed and functional for daily use. APIs and behavior may evolve between releases.
- Stability: Functional for daily use
- Test Coverage: Comprehensive test suite including unit, integration, and E2E tests
- CI/CD: Automated testing and benchmarking via GitHub Actions
- Documentation: API docs auto-generated from TypeDoc and Pike autodoc
Features
Pike LSP provides a full suite of language features:
Core Language Features
- Syntax Highlighting - Semantic token-based highlighting
- Code Completion - Intelligent autocomplete with context-aware suggestions
- Go to Definition - Navigate to symbol definitions (F12)
- Find References - Find all usages of a symbol (Shift+F12)
- Hover Information - Type info and documentation on hover
- Diagnostics - Real-time syntax error detection
- Signature Help - Parameter hints while typing
Advanced Features
- Rename Symbol - Safely rename across files (F2)
- Call Hierarchy - View incoming/outgoing calls
- Type Hierarchy - Explore class inheritance
- Code Lens - Reference counts above functions
- Document Links - Clickable paths in comments
- Workspace Symbols - Search symbols project-wide (Ctrl+T)
- Code Actions - Quick fixes and refactorings
- Formatting - Document and range formatting
- Smart Completion - Scope operator completion with deprecated tag support
Roxen Framework Support
- Module Detection - Automatic detection of Roxen modules
- RXML Completion - Tag and attribute completion for RXML templates
- Defvar Support - Variable extraction and completions
- Lifecycle Callbacks - Detection and validation of module callbacks
Requirements
Quick Start
Install from VS Code Marketplace
- Open VS Code
- Go to Extensions (
Ctrl+Shift+X) - Search for Pike Language Support
- Install
Build from Source
git clone https://github.com/TheSmuks/pike-lsp.git
cd pike-lsp
bun install
bun run build
Project Structure
pike-lsp/
├── packages/
│ ├── pike-bridge/ # TypeScript ↔ Pike IPC layer
│ ├── pike-lsp-server/ # LSP server implementation
│ └── vscode-pike/ # VS Code extension
├── pike-scripts/
│ ├── analyzer.pike # Pike parsing entry point
│ └── LSP.pmod/ # Pike modular analyzer logic
└── docs/ # Documentation
Next Steps
- Getting Started - Installation and setup instructions
- Features - Complete feature list and usage
- Configuration - VS Code settings and options
- API Reference - TypeScript and Pike API documentation
- Contributing - How to contribute to the project
License
MIT License - see LICENSE for details.
Acknowledgments
- vscode-languageserver-node - LSP framework
- Pike - The Pike programming language
- Tools.AutoDoc - Pike's documentation parser