Language support for Comline schema files (.ids).
This extension provides rich language support for Comline through integration with the Comline Language Server:
- Keywords:
struct,enum,protocol,const,use,import,namespace,option - Primitive types:
i8-i128,u8-u128,f32,f64,bool,string,bytes - Collection types:
list,map,set,option - Comments: single-line (
//) and multi-line (/* */) - String literals and escape sequences
- Numbers: integers, floats, hexadecimal
- Real-time Diagnostics - Syntax error detection as you type
- Document Symbols - Hierarchical outline view (Ctrl/Cmd+Shift+O)
- Hover Information - Type definitions and signatures on hover
- Go to Definition - Jump to type declarations (F12)
- Find References - Locate all usages of a symbol (Shift+F12)
- Auto-Completion - Context-aware suggestions for keywords, types, and symbols
- Semantic Tokens - Enhanced syntax highlighting based on semantic analysis
- Comment toggling (
Ctrl/Cmd+/) - Bracket matching and auto-closing
- Code folding for struct/enum/protocol blocks
- Download the latest
.vsixfile from releases - In VSCode:
Extensions→...→Install from VSIX... - Select the downloaded file
Search for "Comline" in the VSCode Extensions marketplace.
The extension supports three modes for locating the language server binary:
The extension includes a pre-built language server binary. No configuration needed!
Use a globally installed comline-lsp binary:
{
"comline.server.mode": "path"
}First, install the language server:
cargo install --git https://github.com/ComlineProject/language-serverSpecify a custom path to the language server binary:
{
"comline.server.mode": "custom",
"comline.server.customPath": "/path/to/comline-lsp"
}{
// Enable debug logging
"comline.server.debug": true,
// Trace LSP communication (off, messages, verbose)
"comline.trace.server": "messages"
}- Open any
.idsfile - The extension will automatically activate and start the language server
- Enjoy intelligent code editing features!
// User service protocol
namespace user.v1;
struct User {
id: u64,
name: string,
email: string,
created_at: i64,
}
enum UserRole {
Admin,
User,
Guest,
}
protocol UserService {
fn get_user(id: u64) -> option<User>;
fn create_user(name: string, email: string) -> User;
fn delete_user(id: u64) -> bool;
}
- Default mode: Ensure the bundled binary is included with the extension
- PATH mode: Run
which comline-lsp(Linux/Mac) orwhere comline-lsp(Windows) to verify installation - Custom mode: Check that
comline.server.customPathpoints to the correct binary
- Ensure the file has a
.idsextension - Try reloading the window:
Ctrl/Cmd+Shift+P→Developer: Reload Window
- Check the Output panel:
View→Output→ Select "Comline Language Server" - Enable trace logging:
"comline.trace.server": "verbose" - Restart the language server:
Ctrl/Cmd+Shift+P→Comline: Restart Language Server
# Clone the repository
git clone https://github.com/ComlineProject/language-server
cd language-server/plugins/vscode/comline-vscode
# Install dependencies
yarn install
# Compile TypeScript
yarn compile
# Package the extension
yarn packageThis creates a .vsix file that can be installed manually.
Contributions are welcome! Please open issues or submit pull requests on GitHub.
MIT License - see LICENSE for details.