Editor & IDE Setup¶
Note: Incan-specific tooling is in development. This guide will be updated as the tooling improves.
On this page:
Syntax Highlighting¶
Example of Incan Syntax Highlighting in VS Code
VS Code / Cursor (Recommended)¶
The Incan extension provides full syntax highlighting for .incn files.
Installation:
- Copy the
editors/vscode/folder to your VS Code extensions directory:
# macOS/Linux
cp -r editors/vscode ~/.vscode/extensions/incan-language
# Or for Cursor
cp -r editors/vscode ~/.cursor/extensions/incan-language
-
Restart VS Code/Cursor
-
Open any
.incnfile - syntax highlighting should work automatically
Features:
- Full syntax highlighting for all Incan constructs
- Keywords:
model,class,trait,enum,newtype,async,await - Rust-style operators:
?,:: - F-string interpolation highlighting
- Type annotations
- Decorators (
@derive,@skip, etc.) - Markdown code block highlighting for
incanlanguage - LSP integration - Diagnostics, hover, go-to-definition (requires incan-lsp)
See editors/vscode/README.md for full
details.
Alternative: Use Python highlighting
If you don't want to install the extension:
- Open Settings (
Cmd/Ctrl+,) - Search for "files.associations"
- Add:
"*.incn": "python"
Note: Although most of the syntax for Incan is supported by Python, using Python highlighting will not provide the full Incan experience. It's a good way to 'get started' quickly without installing the extension.
Vim/Neovim¶
Add to your config:
" Associate .incn files with Python syntax
autocmd BufNewFile,BufRead *.incn set filetype=python
JetBrains IDEs (PyCharm, IntelliJ)¶
- Go to Settings → Editor → File Types
- Find "Python" and add
*.incnto registered patterns
Language Server (LSP)¶
The Incan Language Server provides IDE integration:
- Real-time diagnostics - See errors as you type
- Hover information - View types and signatures
- Go-to-definition - Jump to symbol definitions
- Completions - Keywords and symbols
See Language Server for setup instructions.
Format on Save¶
VS Code / Cursor¶
Once the Incan extension is available, format-on-save will be supported.
For now, you can set up a task or use a file watcher:
// .vscode/tasks.json
{
"version": "2.0.0",
"tasks": [
{
"label": "Format Incan",
"type": "shell",
"command": "incan fmt ${file}",
"group": "build",
"presentation": {
"reveal": "silent"
}
}
]
}
Recommended Extensions¶
- Error Lens - Inline error display
- TODO Highlight - Track TODOs in code
Next Steps¶
- Formatting Guide - Code style and
incan fmt - Language Guide - Learn Incan syntax and features
- Examples - Sample programs
