Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add C3 language support with syntax highlighting and LSP#2101

Merged
sinelaw merged 1 commit into
mastersinelaw/fresh:masterfrom
claude/intelligent-brahmagupta-2Pm5ysinelaw/fresh:claude/intelligent-brahmagupta-2Pm5yCopy head branch name to clipboard
May 25, 2026
Merged

Add C3 language support with syntax highlighting and LSP#2101
sinelaw merged 1 commit into
mastersinelaw/fresh:masterfrom
claude/intelligent-brahmagupta-2Pm5ysinelaw/fresh:claude/intelligent-brahmagupta-2Pm5yCopy head branch name to clipboard

Conversation

@sinelaw

@sinelaw sinelaw commented May 25, 2026

Copy link
Copy Markdown
Owner

Summary

This PR adds comprehensive support for the C3 programming language to Fresh editor, including syntax highlighting, language configuration, and Language Server Protocol (LSP) integration.

Key Changes

  • C3 Syntax Grammar (c3.sublime-syntax): Added a complete TextMate-compatible syntax definition for C3 with support for:

    • Comments (line comments, block comments, and documentation comments)
    • String and character literals with escape sequences
    • Numeric literals (integers, floats, hex, binary, octal with various type suffixes)
    • Keywords (control flow, declarations, type definitions, module system)
    • Built-in types (signed/unsigned integers, floating point, primitives)
    • Compile-time directives and macros ($ and $$ prefixes)
    • Attributes (@ prefix)
    • Operators and punctuation
  • Language Configuration (config.rs): Registered C3 as a supported language with:

    • File extensions: .c3, .c3i, .c3t
    • Comment prefix: //
    • Auto-indentation enabled
    • Whitespace tab visibility enabled
  • LSP Integration (config.rs): Added Language Server Protocol configuration for C3:

    • Server command: c3lsp
    • Root markers: project.json and .git
    • Auto-start disabled (manual activation)
  • Grammar Registry (types.rs and build.rs): Integrated the C3 grammar into the editor's grammar registry system for proper syntax highlighting support

Implementation Details

The C3 syntax grammar follows the language reference from https://c3-lang.org/ and includes proper scoping for all major language constructs. The LSP configuration references the c3lsp language server (https://github.com/pherrymason/c3-lsp), which users can install separately.

https://claude.ai/code/session_01S1AYaz6BDywqqHdMXTQ7qC

Adds a sublime-syntax grammar for C3 (no new tree-sitter dependency),
embeds it into the syntax packdump, and ships default language and LSP
(c3lsp) config so .c3/.c3i/.c3t files are detected, highlighted, and can
attach a language server out of the box.

Closes #2096

https://claude.ai/code/session_01S1AYaz6BDywqqHdMXTQ7qC
@sinelaw

sinelaw commented May 25, 2026

Copy link
Copy Markdown
Owner Author

Fixes #2096

@sinelaw
sinelaw merged commit 0ab7884 into master May 25, 2026
8 checks passed
@sinelaw
sinelaw deleted the claude/intelligent-brahmagupta-2Pm5y branch May 25, 2026 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.