Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Sans Programming LanguageNew to Visual Studio Code? Get it now.
Sans Programming Language

Sans Programming Language

Sans Lang

|
1 install
| (0) | Free
Language support for the Sans programming language - One language. Every platform.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Sans Language Support for VS Code

VS Marketplace Installs License

This extension provides comprehensive language support for the Sans programming language in Visual Studio Code.

One language. Every platform.

Installation

From VS Marketplace (Recommended)

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
  3. Search for "Sans Language Support"
  4. Click Install

Or install via command line:

code --install-extension sans-lang.sans-lang

From VSIX File

Download the latest .vsix file from Releases and install:

code --install-extension sans-lang-0.1.0.vsix

Language Server Setup

The extension requires the Sans Language Server (sans-lsp) for full functionality.

Install with Cargo

cargo install sans-lsp

Build from Source

git clone https://github.com/sans-lang/sans
cd sans
cargo build --release -p sans-lsp
# Add target/release to your PATH

Features

Syntax Highlighting

Full TextMate grammar support for Sans source files with semantic token highlighting.

Syntax Highlighting

IntelliSense

  • Code Completion: Context-aware completions for keywords, types, functions, and variables
  • Hover Information: Documentation and type information on hover
  • Signature Help: Parameter hints when calling functions

Navigation

  • Go to Definition: Jump to symbol definitions (F12 / Cmd+Click)
  • Find All References: Find all usages of a symbol (Shift+F12)
  • Document Symbols: Quick navigation via outline view (Ctrl+Shift+O / Cmd+Shift+O)

Diagnostics

Real-time error checking and warnings as you type.

Code Formatting

Automatic code formatting with configurable settings:

  • Tab size and spaces/tabs preference
  • Format on save option

Inlay Hints

Type annotations displayed inline for better code understanding.

Configuration

Access settings via File > Preferences > Settings and search for "Sans".

Setting Default Description
sans.lsp.path "" Path to the sans-lsp executable. Empty uses PATH.
sans.lsp.args [] Additional arguments for the language server
sans.lsp.trace "off" Trace LSP communication ("off", "messages", "verbose")
sans.format.enable true Enable code formatting
sans.format.onSave false Format document on save
sans.format.tabSize 4 Number of spaces per indentation level
sans.format.insertSpaces true Use spaces instead of tabs
sans.diagnostics.enable true Enable diagnostic messages
sans.completion.enable true Enable code completion
sans.hover.enable true Enable hover information
sans.inlayHints.enable true Enable inlay hints
sans.lint.enable true Enable lint warnings
sans.lint.showTodoHints true Show TODO/FIXME comments as hints
sans.lint.warnEmptyFunctions false Warn about empty function bodies

Example settings.json

{
  "sans.lsp.path": "/usr/local/bin/sans-lsp",
  "sans.format.onSave": true,
  "sans.format.tabSize": 2,
  "sans.inlayHints.enable": true
}

Commands

Open Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and type "Sans" to see available commands:

Command Description
Sans: Restart Language Server Restart the LSP server
Sans: Stop Language Server Stop the LSP server
Sans: Start Language Server Start the LSP server
Sans: Show Output Channel View LSP logs
Sans: Show Version Display extension version

Snippets

The extension includes useful snippets. Type the prefix and press Tab:

Prefix Description
fn Function definition
afn Async function
main Main entry point
struct Struct definition
enum Enum definition
trait Trait definition
impl Implementation block
let Let binding
if If statement
ifelse If-else statement
match Match expression
for For loop
while While loop
loop Infinite loop
test Test function
mod Module declaration
use Use statement

Troubleshooting

Language server not found

Error: "Cannot find sans-lsp executable"

Solution:

  1. Ensure sans-lsp is installed (see Language Server Setup)
  2. Verify it's in your PATH: which sans-lsp
  3. Or set the explicit path in settings: "sans.lsp.path": "/path/to/sans-lsp"

No syntax highlighting

Solution:

  1. Ensure the file has .sans extension
  2. Check that Sans is selected as the language (bottom-right of VS Code)
  3. Reload VS Code window: Cmd+Shift+P > "Developer: Reload Window"

Diagnostics not working

Solution:

  1. Check that sans.diagnostics.enable is true
  2. Restart the language server: Cmd+Shift+P > "Sans: Restart Language Server"
  3. Check output for errors: Cmd+Shift+P > "Sans: Show Output Channel"

High CPU usage

Solution:

  1. Check for very large files (>10,000 lines)
  2. Disable features you don't need (inlay hints, lint)
  3. Set sans.lsp.trace to "off"

Extension crashes

Solution:

  1. Check VS Code version (requires 1.80.0+)
  2. Update to latest extension version
  3. Report issue with logs at GitHub Issues

Development

Building the Extension

Using Docker (recommended):

cd editors/vscode
docker-compose run --rm compile

Or locally:

npm install
npm run compile

Running in Development

  1. Open editors/vscode folder in VS Code
  2. Press F5 to launch Extension Development Host
  3. Open a .sans file to test

Packaging

# Using Docker
docker-compose run --rm vsce-package

# Or locally
npm run package

Publishing

# Set your VS Marketplace token
export VSCE_PAT=your-token-here

# Using the publish script
./vsce-publish.sh --publish

# Or using Docker
docker-compose run --rm vsce-publish

Known Issues

  • Semantic highlighting may not work correctly in some edge cases with complex generics
  • Large files (>10,000 lines) may experience slight delays in diagnostics

See GitHub Issues for all known issues.

Contributing

Contributions are welcome! Please read our Contributing Guide.

Reporting Issues

  1. Check existing issues
  2. Include VS Code version, extension version, and OS
  3. Attach relevant logs from "Sans: Show Output Channel"

Release Notes

See CHANGELOG.md for detailed release notes.

0.1.0

  • Initial release with syntax highlighting, LSP integration, and code snippets

License

Apache-2.0 - See LICENSE for details.


Sans - One language. Every platform.

Website | Documentation | GitHub

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft