lsp command manages the Gleeb Language Server Protocol (LSP) server, which provides IDE features like autocomplete, error checking, and code navigation for Fern development.
Usage
Commands
start
Start the Gleeb LSP server:Run server in background (daemon mode)
Short form of
--backgroundTCP port to listen on (otherwise uses stdio)
stop
Stop the running LSP server:status
Show LSP server status and configuration:config
Configure editor integration:Editor to configure (currently only
vscode supported)install
Install or reinstall the Gleeb LSP server:restart
Restart the LSP server:stop then start --background.
Installation
The LSP server must be installed before use:- Clones Gleeb LSP from GitHub (or uses local copy if in development)
- Installs Node.js dependencies
- Builds the TypeScript source
- Creates launcher scripts in
~/.local/bin/
IDE Integration
VS Code
The extension provides:
- Autocomplete - Code completion for Fern APIs
- Error checking - Real-time syntax and type errors
- Go to definition - Jump to function/class definitions
- Hover information - Documentation on hover
- Code formatting - Automatic code formatting
Manual Configuration
If automatic configuration doesn’t work, add to VS Codesettings.json:
Server Modes
Stdio Mode (Default)
Server communicates over stdin/stdout:TCP Mode
Server listens on a network port:- Remote development
- Debugging
- Multiple client connections
Requirements
The LSP server requires:- Node.js (v14 or later)
- npm (comes with Node.js)
- Git (for installation)
Server Locations
LSP server installation directory
Compiled LSP server executable
Process ID file (when running in background)
Launcher script for manual server startup
Development Mode
When developing Fern itself:Troubleshooting
Node.js not found
Node.js not found
Server won't start
Server won't start
Check the status:Try reinstalling:
VS Code extension not working
VS Code extension not working
-
Verify server is running:
-
Check VS Code output panel:
- View → Output
- Select “Gleeb LSP” from dropdown
-
Restart VS Code and the LSP server:
Build failed during install
Build failed during install
Features
The Gleeb LSP provides:Code Completion
- API method suggestions
- Parameter hints
- Import suggestions
- Fern namespace completion
Diagnostics
- Syntax errors
- Type errors
- Undefined reference warnings
- Best practice suggestions
Code Navigation
- Go to definition
- Find references
- Workspace symbol search
- Document outline
Documentation
- Hover documentation
- Signature help
- Parameter documentation
- Example code snippets
Manual Server Control
The LSP can also be started manually:Logs
View server logs for debugging:Updating
To update to the latest version:Related Commands
fern bloom- Checks if Node.js is availablefern sprout- Creates projects with VS Code config