Editor Setup
Conduit provides both syntax highlighting (editors/textmate) and a built-in Language Server (conduit lsp).
Language Server (conduit lsp)
Start the stdio JSON-RPC language server with:
bash
conduit lspSupported capabilities:
- Real-time diagnostics: Type-checks open and unsaved
.cdtbuffers (including multi-file relative imports) on open/change. - Hover: Shows signatures, parameter names/types, return unions, and leading
//comments for user-definedfunc,struct,const, andenumdeclarations, allcdt.*modules (cli,env,fs,path,process,crypto,url,csv,math,log,json,time,validation,http,db,cron), and built-in methods/keywords. - Go to Definition (
textDocument/definition): Jump (Cmd+Click/F12) tofunc,struct,type,const, andenumdeclarations in the current file, imported symbols, and relativeimport "./..."file paths. - Document Symbols (
textDocument/documentSymbol): Populates the editor Outline withfunc,struct,type,const, andenumdeclarations. - Rename (
textDocument/rename): Renames symbols across the current.cdtfile. - Formatting (
textDocument/formatting): Formats the active.cdtdocument using the same rules asconduit fmt. - Completion: Dot-completion for
cdt.*modules andEnum.variants, plus user-defined functions, structs, constants, enums, and keywords.
JetBrains IDEs (PhpStorm, RustRover, IntelliJ IDEA)
1. Syntax Highlighting (TextMate Bundle)
- Open Settings / Preferences (
Ctrl+Alt+SorCmd+,). - Navigate to Editor > TextMate Bundles.
- Make sure the TextMate Bundles plugin is enabled in Settings > Plugins.
- Click
+and select theconduit/editors/textmatedirectory from this repository. - Click Apply.
JetBrains IDEs automatically map the upgraded semantic TextMate scopes in conduit.tmLanguage.json (declarations, spawn concurrency via keyword.control.concurrency.conduit in #E06C75 bold, DSL blocks including router and on start/on stop lifecycle hooks, HTTP methods, annotations, properties, constants, operators) to your active JetBrains Color Scheme.
2. Diagnostics, Hover & Completion (LSP4IJ)
- Install the LSP4IJ plugin from JetBrains Marketplace.
- Open Settings > Languages & Frameworks > Language Servers and click +.
- Set Command to
conduit lsp(or the full path to yourconduitbinary). - On the Mappings tab, add a File name pattern:
*.cdt(Language Id:conduit). - Click Apply.
Antigravity / Visual Studio Code
- Open the Command Palette (
Cmd+Shift+P/Ctrl+Shift+P). - Run Developer: Install Extension from Location... and select
conduit/editors/textmate. - Run Developer: Reload Window.
JetBrains PhpStorm Dark Colors
You have two ways to enable PhpStorm-style syntax colors:
- Full theme (
Conduit PhpStorm Dark): Open Command Palette -> Preferences: Color Theme and choose Conduit PhpStorm Dark (themes/conduit-phpstorm-dark.json). - Keep your current theme (color
.cdtfiles only): Copy the contents ofeditors/textmate/phpstorm-token-colors.jsoninto your Usersettings.json("editor.tokenColorCustomizations"). It targets only*.conduitscopes without altering other languages.