Gleeb LSP for Fern UI
A Visual Studio Code extension that provides Language Server Protocol (LSP) support for the Fern UI Framework. This extension enables intelligent code completion, diagnostics, hover information, and other advanced features for Fern UI development.
Features
- Intelligent Code Completion: Auto-completion for Fern UI widgets, layouts, and properties
- Real-time Diagnostics: Instant error detection and suggestions
- Hover Information: Contextual documentation and type information
- Syntax Highlighting: Enhanced syntax highlighting for Fern UI code
- Code Snippets: Pre-built snippets for common Fern UI patterns
Installation
Option 1: VS Code Marketplace (Recommended)
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "Gleeb LSP for Fern UI"
- Click Install
Option 2: Manual Installation
Install the Fern UI Framework with LSP support:
git clone https://github.com/fernkit/fern.git
cd fern
./install.sh
Configure VS Code:
fern lsp config --editor vscode
Install this extension from the marketplace or manually
Usage
Quick Start
- Open a C++ file that uses Fern UI
- Start typing Fern UI code - auto-completion will appear automatically
- Use
Ctrl+Space
to trigger completion manually
- Hover over Fern UI elements to see documentation
Commands
- Gleeb: Restart LSP Server - Restart the language server
- Gleeb: Show Output Channel - View LSP server logs
- Gleeb: Install LSP Server - Install or reinstall the LSP server
Code Snippets
Type these prefixes and press Tab:
Prefix |
Description |
fern-basic |
Basic Fern UI application structure |
fern-button |
Button widget with event handler |
fern-text |
Text widget with styling |
fern-column |
Column layout container |
fern-row |
Row layout container |
fern-input |
Text input widget |
fern-circle |
Circle widget |
fern-line |
Line widget |
Configuration
The extension can be configured through VS Code settings:
{
"gleeb.enable": true,
"gleeb.server.path": "",
"gleeb.diagnostics.enable": true,
"gleeb.completion.enable": true,
"gleeb.hover.enable": true,
"gleeb.maxNumberOfProblems": 100,
"gleeb.trace.server": "off"
}
Requirements
- VS Code 1.74.0 or higher
- Node.js 16.x or higher
- Fern UI Framework installed
- Gleeb LSP server (automatically installed with Fern)
Troubleshooting
LSP Server Not Starting
- Check if the server is installed:
fern lsp status
- Restart the server:
fern lsp restart
- Check output channel: View > Output > Gleeb LSP
No Auto-completion
- Ensure the extension is enabled in settings
- Check file extensions (should be .cpp or .c with Fern UI code)
- Restart VS Code
- Run command: Gleeb: Restart LSP Server
- Reduce
gleeb.maxNumberOfProblems
setting
- Disable diagnostics temporarily:
"gleeb.diagnostics.enable": false
- Check server logs in output channel
Contributing
We welcome contributions! Please see our Contributing Guide for details.
License
This extension is licensed under the MIT License. See LICENSE for details.
Support
Release Notes
1.0.0
- Initial release
- Auto-completion for Fern UI widgets and layouts
- Real-time diagnostics
- Hover information
- Code snippets
- VS Code integration
Enjoy coding with Fern UI! 🌿